技术中心部分修改,添加库存系统
This commit is contained in:
460
src/views/Inventory/DirectPart/index.vue
Normal file
460
src/views/Inventory/DirectPart/index.vue
Normal file
@@ -0,0 +1,460 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>采购合同:</span>
|
||||
<el-select v-model="ContractValue" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in Contract"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total = 0;pageSize = 10;pageList = 1;searchPartinfo()">查询</el-button><br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableDataPurchase"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="采购合同编号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="addDirect(scope.row)">直达</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="searchDirect(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="directRecord"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="changeDirect(scope.row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<!--新增直达件对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="新增直达件" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="到货数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.DirectNumber" size="small" placeholder="到货数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in People"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.DirectNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="addDirectPartm()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--编辑直达件对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="编辑直达件" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="到货数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.DirectNumber" size="small" placeholder="到货数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in People"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.DirectNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="editDirectPartm()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchDirectPart, searchPeople, searchContract, addDirectPart, searchDirectRec, editDirectRec, deleteDirectRec } from '@/api/Inventory/DirectPart'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ProjectValue: '',
|
||||
Project: [],
|
||||
ProjectValue_check: 1,
|
||||
MachineValue: '',
|
||||
Machine: [],
|
||||
MachineValue_check: 1,
|
||||
GroupNumValue: '',
|
||||
GroupNumValue_check: 1,
|
||||
GroupNum: [],
|
||||
tableDataPurchase: [],
|
||||
form: {
|
||||
DirectNumber: '',
|
||||
getPeople: '',
|
||||
DirectNote: ''
|
||||
},
|
||||
PeopleValue: '',
|
||||
People: [],
|
||||
Contract: [],
|
||||
ContractValue: '',
|
||||
ContractValue_check: 1,
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
rules: { // 表单验证规则
|
||||
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }],
|
||||
getPeople: [{ required: true, message: '请选择领用人', trigger: 'blur' }],
|
||||
DirectNote: [{ required: true, message: '请输入直达件备注', trigger: 'change' }]
|
||||
},
|
||||
materialNum: '',
|
||||
purchaseContractNumber: '',
|
||||
locate: '',
|
||||
PeopleNumber: '', // 入库人员流水号
|
||||
directRecord: [],
|
||||
teamPart: '',
|
||||
listLoading: '',
|
||||
listLoading1: '',
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: null,
|
||||
projectName: '',
|
||||
machineName: '',
|
||||
teamName: '',
|
||||
materialName: '',
|
||||
contractNumber: '',
|
||||
directPartNumber: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchPeopleData()
|
||||
this.searchContractData()
|
||||
this.getpeopleid()
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
||||
},
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.PeopleNumber = this.id
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组件名称,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchPeopleData() { // 查询人员
|
||||
searchPeople().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.People.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].考勤编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchContractData() { // 查询合同
|
||||
searchContract().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Contract.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
value: response.data[i].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchPartinfo() {
|
||||
this.tableDataPurchase = []
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === '') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === '') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
if (this.ContractValue === '') {
|
||||
this.ContractValue_check = 0
|
||||
}
|
||||
this.listLoading = true
|
||||
searchDirectPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue, this.ContractValue_check, this.ContractValue).then(response => {
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 查询采购合同明细
|
||||
// searchContractDetailinfo() {
|
||||
// searchContractDetail(this.ContractValue).then(response => {
|
||||
// this.tableDataPurchase = response.data
|
||||
// })
|
||||
// },
|
||||
// 查询直达件记录
|
||||
searchDirect(row) {
|
||||
this.purchaseContractNumber = row.采购合同明细流水号
|
||||
this.listLoading = true
|
||||
searchDirectRec(this.purchaseContractNumber).then(response => {
|
||||
this.directRecord = response.data
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 打开直达件表单
|
||||
addDirect(row) {
|
||||
this.PeopleValue = ''
|
||||
this.form = []
|
||||
console.log(row)
|
||||
this.dialogFormVisible = true
|
||||
this.materialNum = row.物料流水号
|
||||
this.purchaseContractNumber = row.采购合同明细流水号
|
||||
this.teamPart = row.组件零件流水号
|
||||
this.projectName = row.项目名称
|
||||
this.machineName = row.机床名称
|
||||
this.teamName = row.组件名称
|
||||
this.materialName = row.物料名称
|
||||
this.contractNumber = row.采购合同编号
|
||||
},
|
||||
// 打开直达件编辑表单
|
||||
changeDirect(row) {
|
||||
console.log(row)
|
||||
this.dialogFormVisible1 = true
|
||||
this.directPartNumber = row.直达件流水号
|
||||
this.form.DirectNumber = row.到货数量
|
||||
this.PeopleValue = row.领用人员流水号
|
||||
this.form.DirectNote = row.备注
|
||||
},
|
||||
// 修改直达件
|
||||
editDirectPartm() {
|
||||
editDirectRec(this.directPartNumber, this.form.DirectNumber, this.PeopleValue, this.form.DirectNote).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息修改成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.searchDirect()
|
||||
} else {
|
||||
this.$message.error('信息修改失败')
|
||||
}
|
||||
})
|
||||
searchDirectRec(this.purchaseContractNumber).then(response => {
|
||||
this.directRecord = response.data
|
||||
this.listLoading = false
|
||||
})
|
||||
this.dialogFormVisible1 = false
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
this.form.DirectNumber = ''
|
||||
this.form.getPeople = ''
|
||||
this.form.DirectNote = ''
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible1 = false
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
// 增加直达件
|
||||
addDirectPartm() {
|
||||
console.log(this.materialNum, this.form.DirectNumber, this.locate, this.purchaseContractNumber, this.PeopleNumber, this.PeopleValue, this.form.DirectNumber, this.teamPart, this.form.DirectNote)
|
||||
addDirectPart(this.materialNum, this.form.DirectNumber, this.locate, this.purchaseContractNumber, this.PeopleNumber, this.PeopleValue, this.form.DirectNumber, this.teamPart, this.projectName, this.machineName, this.teamName, this.materialName, this.contractNumber, this.form.DirectNote).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.searchDirect()
|
||||
} else {
|
||||
this.$message.error('信息添加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
// 删除领料单
|
||||
dropListinfor(row) {
|
||||
this.directPartNumber = row.直达件流水号
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteDirectRec(this.directPartNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
searchDirectRec(this.purchaseContractNumber).then(response => {
|
||||
this.directRecord = response.data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
186
src/views/Inventory/ExchangeApproval/index.vue
Normal file
186
src/views/Inventory/ExchangeApproval/index.vue
Normal file
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="width: 100%;height: 100%;" height="300px" size="mini">
|
||||
<el-table-column label="交换单编号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交换单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交换件名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交换件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="被交换件名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.被交换件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交换数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交换数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchExchangePart, approvalExchangepart, disappExchangepart } from '@/api/Inventory/ExchangeApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 财务审核
|
||||
data() {
|
||||
return {
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
tableData2: [],
|
||||
pageSize2: 10,
|
||||
pageCurrent2: 1,
|
||||
total2: 0,
|
||||
gridData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable1() {
|
||||
searchExchangePart(this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
console.log(response)
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageSize2 = val
|
||||
this.pageCurrent2 = 1
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
// searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
// searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
|
||||
// this.gridData = response.data
|
||||
// })
|
||||
// },
|
||||
yesApproval(row) { // 通过审核
|
||||
this.$confirm('确定审核通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
approvalExchangepart(row.交换单流水号, row.交换件物料流水号, row.交换件组件零件流水号, row.交换件采购合同明细流水号, row.货位流水号, row.交换数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noApproval(row) { // 不通过审核
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
disappExchangepart(row.交换单流水号, value).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
</style>
|
||||
481
src/views/Inventory/ExchangePart/index.vue
Normal file
481
src/views/Inventory/ExchangePart/index.vue
Normal file
@@ -0,0 +1,481 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total = 0;pageSize = 10;pageList = 1;searchPartinfo()">查询</el-button><br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableDataPurchase"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">交换</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-sort-down" style="margin: 0 0 0 0px" @click="selected(scope.row)">被交换</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<div>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="100"
|
||||
>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div style="margin: 10px 15px">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange()" >交换</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<div>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="100">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--新增交换件对话框-->
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="交换单编号" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.ExchangeNumber" size="small" placeholder="请输入零件交换单编号" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="交换数量" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNumberx" size="small" placeholder="请输入交换数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button v-show="title==='交换'" type="primary" @click="addListDetailinfor('form')">确 定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="tableDataExchange"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="交换单编号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交换单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交换件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交换件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="被交换件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.被交换件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交换数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交换数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批状态" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批状态 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="180">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, addExchangepart, searchExchangePart, dropExchangeList, editExchangeList } from '@/api/Inventory/ExchangePart'
|
||||
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: [],
|
||||
tableDataExchange: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableDataPicking: [], // 领料单明细表格
|
||||
listNumber: '',
|
||||
pickingListNumber: null, // 领料单编号
|
||||
pickingListNumberx: '', // 领料单流水号
|
||||
picikingPeople: '', // 领料人流水号
|
||||
partProjectNumber: '', // 项目流水号
|
||||
partProjectName: '', // 项目名称
|
||||
partMachineNumber: '', // 机床流水号
|
||||
partMachineName: '', // 机床名称
|
||||
partGroupNumber: '', // 分组流水号
|
||||
partGroupName: '', // 分组名称
|
||||
OutNumber: '', // 出库数量
|
||||
outNote: '', // 出库备注
|
||||
dialogFormVisible: false,
|
||||
arr: [],
|
||||
form: {
|
||||
ExchangeNumber: '', // 交换件编号
|
||||
ExchangeNumberx: '', // 交换件数量
|
||||
ExchangeNote: '' // 交换件备注
|
||||
},
|
||||
rules: { // 表单验证规则
|
||||
ExchangeNumber: [{ required: true, message: '请输入交换件编号', trigger: 'blur' }],
|
||||
ExchangeNumberx: [{ required: true, message: '请输入交换件数量', trigger: 'blur' }],
|
||||
ExchangeNote: [{ required: true, message: '请输入交换件备注', trigger: 'change' }]
|
||||
},
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: null,
|
||||
PageCurrent1: 1,
|
||||
PageSize1: 10,
|
||||
total1: null,
|
||||
listLoading: '',
|
||||
listLoading1: '',
|
||||
exchangeListNumber: '',
|
||||
eTeamPartNumber: '',
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.getpeopleid()
|
||||
this.getExchangeTable()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
||||
},
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.picikingPeople = this.id
|
||||
console.log(this.picikingPeople)
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组件名称,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchPartinfo() {
|
||||
this.tableDataPurchase = []
|
||||
this.tableDataBasic = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
this.listLoading = true
|
||||
searchPurchasePart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataPurchase = response.data.rows
|
||||
console.log(this.tableDataPurchase)
|
||||
this.total = response.data.total
|
||||
})
|
||||
this.listLoading = false
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
// 查询交换件
|
||||
getExchangeTable() {
|
||||
this.listLoading1 = true
|
||||
searchExchangePart(this.PageCurrent1, this.PageSize1).then(response => {
|
||||
this.tableDataExchange = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
this.listLoading1 = false
|
||||
})
|
||||
},
|
||||
// 选择领料单
|
||||
chooseListinfor(row) {
|
||||
this.pickingListNumberx = row.领料单流水号
|
||||
console.log(this.pickingListNumberx)
|
||||
this.searchListDetailt()
|
||||
},
|
||||
// 增加交换件
|
||||
addListDetailinfor() {
|
||||
addExchangepart(this.form.ExchangeNumber, this.tableData1[0].组件零件流水号, this.tableData1[0].物料流水号, this.tableData1[0].采购合同明细流水号, this.tableData2[0].组件零件流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.getExchangeTable()
|
||||
},
|
||||
// 打开交换表单
|
||||
exchange() {
|
||||
this.title = '交换'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
this.form.ExchangeNumber = ''
|
||||
this.form.ExchangeNumberx = ''
|
||||
this.form.ExchangeNote = ''
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
// 选中零件交换
|
||||
selecting(row) {
|
||||
const arr = new Array(row)
|
||||
this.tableData1 = arr
|
||||
console.log(this.tableData1)
|
||||
},
|
||||
// 选中被零件交换
|
||||
selected(row) {
|
||||
const arr = new Array(row)
|
||||
this.tableData2 = arr
|
||||
},
|
||||
// 删除领料单
|
||||
dropListinfor(row) {
|
||||
this.exchangeListNumber = row.交换单流水号
|
||||
this.eTeamPartNumber = row.交换件组件零件流水号
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
dropExchangeList(this.exchangeListNumber, this.eTeamPartNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.getExchangeTable().then(response => {
|
||||
})
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.exchangeListNumber = row.交换单流水号
|
||||
this.form.ExchangeNumber = row.交换单编号
|
||||
this.form.ExchangeNumberx = row.交换数量
|
||||
this.form.ExchangeNote = row.备注
|
||||
this.title = '编辑'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
submitEdit() {
|
||||
this.editTable(editExchangeList, [this.exchangeListNumber, this.form.ExchangeNumber, this.form.ExchangeNumberx, this.form.ExchangeNote], 'form', function() { this.getExchangeTable(); this.dialogFormVisible = false })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
142
src/views/Inventory/InboundCard/index.vue
Normal file
142
src/views/Inventory/InboundCard/index.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>采购合同编号:</span>
|
||||
<el-select v-model="ContractValue" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in Contract"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span class="demonstration">入库日期</span>
|
||||
<el-date-picker
|
||||
v-model="InboundDate"
|
||||
type="date"
|
||||
size="small"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>仓库:</span>
|
||||
<el-select v-model="InventoryValue" filterable clearable size="small" placeholder="仓库" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in Inventory"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPartinfo()">查询</el-button><br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="400">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="存货编码" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="存货名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币单价" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本币单价" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 * scope.row.实际到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选入</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchContract, searchInventory, searchInbound } from '@/api/Inventory/InboundCard'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Contract: [],
|
||||
ContractValue: '',
|
||||
Inventory: [],
|
||||
InventoryValue: '',
|
||||
InboundDate: '',
|
||||
listLoading: '',
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchContractData()
|
||||
this.searchInventoryData()
|
||||
},
|
||||
methods: {
|
||||
searchContractData() { // 查询合同
|
||||
searchContract().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Contract.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
value: response.data[i].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchInventoryData() { // 查询仓库
|
||||
searchInventory().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Inventory.push({
|
||||
label: response.data[i].仓库名称,
|
||||
value: response.data[i].仓库流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchPartinfo() {
|
||||
this.tableData = []
|
||||
this.listLoading = true
|
||||
searchInbound(this.ContractValue, this.InboundDate, this.InventoryValue).then(response => {
|
||||
this.tableData = response.data
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
259
src/views/Inventory/Inboundscanning/index.vue
Normal file
259
src/views/Inventory/Inboundscanning/index.vue
Normal file
@@ -0,0 +1,259 @@
|
||||
<template>
|
||||
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<span style="margin: 5px">零件图号</span>
|
||||
<el-input v-model="partNumber" clearable size="small" style="width:200px" />
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getscantable()">查询</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-remove-outline" style="margin: 0 0 0 10px" @click="Empty()">清空</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%;height: 650px" >
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="计划数量" align="center" min-width="100">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-input v-model="tableData[scope.$index].plannumber" readonly size="small"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].innumber" clearable size="small"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="inventoryNumber" filterable clearable size="small" placeholder="仓库名称" @change="Getlocate">
|
||||
<el-option
|
||||
v-for="item in inventoryName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="货位" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="locateNumber" filterable clearable size="small" placeholder="货位名称">
|
||||
<el-option
|
||||
v-for="item in locateName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-input v-model="tableData[scope.$index].note" clearable size="small"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete(scope.$index, scope.row)">移除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable, insertOne, getinventory, getlocate } from '@/api/Inventory/Inboundscanning'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { wsuri, name } from '@/utils/request'
|
||||
import print from '@/vendor/print'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ace: 0,
|
||||
a: '',
|
||||
tableData: [],
|
||||
partNumber: '',
|
||||
listLoading: false,
|
||||
craftplannumber: '',
|
||||
radio2: 3,
|
||||
PeopleNumber: '',
|
||||
inventoryName: [], // 仓库名称下拉框
|
||||
inventoryNumber: '',
|
||||
locateName: [], // 货位名称下拉框
|
||||
locateNumber: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.initWebpack()
|
||||
this.getpeopleid()
|
||||
this.Getinvent()
|
||||
},
|
||||
methods: {
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.tableData.splice(index, 1)
|
||||
this.$message({
|
||||
message: '已被成功移除',
|
||||
type: 'success'
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.PeopleNumber = this.id
|
||||
},
|
||||
aaa() {
|
||||
print('#print')
|
||||
},
|
||||
initWebpack() { // 初始化websocket
|
||||
this.websock = new WebSocket(wsuri)// 这里面的this都指向vue
|
||||
this.websock.onopen = this.websocketopen
|
||||
this.websock.onmessage = this.websocketonmessage
|
||||
this.websock.onclose = this.websocketclose
|
||||
this.websock.onerror = this.websocketerror
|
||||
},
|
||||
websocketopen() { // 打开
|
||||
console.log('WebSocket连接成功')
|
||||
this.websock.send('{<' + name + '>}')
|
||||
},
|
||||
websocketonmessage(msg) { // 数据接收
|
||||
this.partNumber = msg.data.split('|')[3]
|
||||
this.getscantable()
|
||||
},
|
||||
websocketclose() { // 关闭
|
||||
console.log('WebSocket关闭')
|
||||
},
|
||||
websocketerror() { // 失败
|
||||
console.log('WebSocket连接失败')
|
||||
},
|
||||
// 扫描查询
|
||||
getscantable() {
|
||||
if (this.partNumber === '') {
|
||||
this.$message.error('请输入零件号')
|
||||
} else {
|
||||
this.listLoading = true
|
||||
searchTable(this.partNumber).then(response => {
|
||||
if (response.data.length === 0) {
|
||||
this.listLoading = false
|
||||
this.$message.warning('无此零件')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) {
|
||||
this.ace = this.ace + 1
|
||||
}
|
||||
}
|
||||
if (this.ace === 0) {
|
||||
this.tableData.push({
|
||||
plannumber: response.data[0].剩余数量,
|
||||
innumber: response.data[0].入库数量,
|
||||
capture: '',
|
||||
note: '',
|
||||
工艺计划流水号: response.data[0].工艺计划流水号,
|
||||
项目名称: response.data[0].项目名称,
|
||||
机床图号: response.data[0].机床图号,
|
||||
零件图号: response.data[0].零件图号
|
||||
})
|
||||
} else {
|
||||
this.$message.error('此件已在列表中')
|
||||
}
|
||||
}
|
||||
}).then(() => {
|
||||
this.listLoading = false
|
||||
this.ace = 0
|
||||
})
|
||||
}
|
||||
},
|
||||
// 修改入库
|
||||
Innumber() {
|
||||
this.$confirm('此操作将不可逆转,且如果入库数量大于计划数量,则全部入库,是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].innumber > this.tableData[i].plannumber) {
|
||||
this.tableData[i].innumber = this.tableData[i].plannumber
|
||||
}
|
||||
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '零件入库成功!'
|
||||
})
|
||||
}).then(() => {
|
||||
this.Empty()
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消入库'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 清空
|
||||
Empty() {
|
||||
this.tableData = []
|
||||
},
|
||||
// 仓库查询
|
||||
Getinvent() {
|
||||
this.getSelect(getinventory, ['仓库名称', '仓库流水号'], 'inventoryName')
|
||||
},
|
||||
// 根据项目获取机床
|
||||
Getlocate() {
|
||||
this.locateName = []
|
||||
this.locateNumber = ''
|
||||
if (this.inventoryNumber) {
|
||||
this.getSelect(getlocate, ['货位名称', '货位流水号'], 'locateName', this.inventoryNumber)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
970
src/views/Inventory/InventoryCheck/index.vue
Normal file
970
src/views/Inventory/InventoryCheck/index.vue
Normal file
@@ -0,0 +1,970 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane label="基本件" name="first"><el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchBasciPartinfo()">基本件查询</el-button><br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableDataBasic"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.可出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="searchBasicPartRecord(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="BasicPartIn"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="入库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库人员" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库人员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
v-loading="listLoading2"
|
||||
:data="BasicPartOut"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用者" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领用人编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库备注" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="通用件" name="second">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total1 = 0;pageSize1 = 10;pageList1 = 1;searchGeneralPartinfo()">通用件查询</el-button><br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading3"
|
||||
:data="tableDataGeneral"
|
||||
:row-style="tableRowClassName2"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.可出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="searchGeneralPartRecord(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading4"
|
||||
:data="PurchasePartIn"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="实际到货数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库人员" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库人员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
v-loading="listLoading5"
|
||||
:data="PurchasePartOut"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用者" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领用者 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="外购件" name="third"><el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total2 = 0;pageSize2 = 10;pageList2 = 1;searchPurchasePartinfo()">外购件查询</el-button><br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading6"
|
||||
:data="tableDataPurchase"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库累计数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="searchPurchasePartRecord(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total2"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading7"
|
||||
:data="PurchasePartIn"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="实际到货数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库人员" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库人员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
v-loading="listLoading8"
|
||||
:data="PurchasePartOut"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用者" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领用者 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="标准件" name="fourth">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total3 = 0;pageSize3 = 10;pageList3 = 1;searchStandardPartinfo()">标准件查询</el-button><br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading9"
|
||||
:data="tableDataStandard"
|
||||
:row-style="tableRowClassName1"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.库存数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200px">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="mini" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="standardselecting(scope.row)" >选择</el-button>
|
||||
<el-button size="mini" type="primary" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="changesafeAmount(scope.row)">修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent3"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total3"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<!--安全库存量对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="安全库存量修改" center width="380px">
|
||||
<el-form ref="form" :model="Project" :rules="rules" label-position="left">
|
||||
<el-form-item label="安全库存量" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.safeNumber" size="small" placeholder="请输入安全库存量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="edeitsafeAmount()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading10"
|
||||
:data="StandardPartIn"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="实际到货数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库人员" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库人员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
v-loading="listLoading11"
|
||||
:data="StandardPartOut"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用者" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领用者 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchStandardPart, searchGeneralPart, searchPurchasePartIn, searchPurchasePartOut, searchBasicPartIn, searchBasicPartOut, safeAmount, searchStandardPartIn, searchStandardPartOut } from '@/api/Inventory/InventoryCheck'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
tableDataBasic: [], // 基本件
|
||||
BasicPartOut: [], // 基本件出库记录
|
||||
BasicPartIn: [], // 基本件入库记录,
|
||||
craftNumber: '',
|
||||
tableDataGeneral: [], // 通用件
|
||||
tableDataPurchase: [], // 外购件
|
||||
PurchasePartOut: [], // 外购件出库记录
|
||||
PurchasePartIn: [], // 外购件入库记录
|
||||
tableDataStandard: [], // 标准件
|
||||
ProjectValue: ' ',
|
||||
Project: [],
|
||||
ProjectValue_check: 1,
|
||||
MachineValue: ' ',
|
||||
Machine: [],
|
||||
MachineValue_check: 1,
|
||||
GroupNumValue: ' ',
|
||||
GroupNumValue_check: 1,
|
||||
GroupNum: [],
|
||||
ContractDetailValue: '',
|
||||
TeamPartNumber: '',
|
||||
form: {
|
||||
safeNumber: ''
|
||||
},
|
||||
rules: { // 表单验证规则
|
||||
safeNumber: [{ required: true, message: '请输入安全库存量', trigger: 'blur' }]
|
||||
},
|
||||
dialogFormVisible2: false,
|
||||
StandardPartOut: [],
|
||||
StandardPartIn: [],
|
||||
GeneralPartIn: [],
|
||||
GeneralPartOut: [],
|
||||
listLoading: '',
|
||||
listLoading1: '',
|
||||
listLoading2: '',
|
||||
listLoading3: '',
|
||||
listLoading4: '',
|
||||
listLoading5: '',
|
||||
listLoading6: '',
|
||||
listLoading7: '',
|
||||
listLoading8: '',
|
||||
listLoading9: '',
|
||||
listLoading10: '',
|
||||
listLoading11: '',
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: null,
|
||||
PageCurrent1: 1,
|
||||
PageSize1: 10,
|
||||
total1: null,
|
||||
PageCurrent2: 1,
|
||||
PageSize2: 10,
|
||||
total2: null,
|
||||
PageCurrent3: 1,
|
||||
PageSize3: 10,
|
||||
total3: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
},
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组件名称,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询外购件
|
||||
searchPurchasePartinfo() {
|
||||
this.listLoading6 = true
|
||||
this.tableDataPurchase = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
searchPurchasePart(this.PageCurrent2, this.PageSize2, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
this.listLoading6 = false
|
||||
})
|
||||
this.projectValue = ' '
|
||||
this.MachineValue = ' '
|
||||
this.GroupNumValue = ' '
|
||||
},
|
||||
// 查询外购件记录
|
||||
searchPurchasePartRecord(row) {
|
||||
this.listLoading7 = true
|
||||
this.listLoading8 = true
|
||||
this.ContractDetailValue = row.采购合同明细流水号
|
||||
this.TeamPartNumber = row.组件零件流水号
|
||||
searchPurchasePartIn(this.ContractDetailValue).then(response => {
|
||||
this.PurchasePartIn = response.data
|
||||
this.listLoading7 = false
|
||||
})
|
||||
searchPurchasePartOut(this.TeamPartNumber).then(response => {
|
||||
this.PurchasePartOut = response.data
|
||||
this.listLoading8 = false
|
||||
})
|
||||
},
|
||||
// 查询标准件
|
||||
searchStandardPartinfo() {
|
||||
this.listLoading9 = true
|
||||
this.tableDataStandard = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
searchStandardPart(this.PageCurrent3, this.PageSize3, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataStandard = response.data.rows
|
||||
this.total3 = response.data.total
|
||||
this.listLoading9 = false
|
||||
console.log(this.tableDataPurchase)
|
||||
})
|
||||
this.projectValue = ' '
|
||||
this.MachineValue = ' '
|
||||
this.GroupNumValue = ' '
|
||||
},
|
||||
standardselecting(row) {
|
||||
this.contractDeatilNumber = row.采购合同明细流水号
|
||||
this.steamPartNumber = row.组件零件流水号
|
||||
this.getStandardPartIn()
|
||||
this.getStandardPartOut()
|
||||
},
|
||||
// 查询标准件入库记录
|
||||
getStandardPartIn() {
|
||||
this.listLoading10 = true
|
||||
searchStandardPartIn(this.contractDeatilNumber).then(response => {
|
||||
this.StandardPartIn = response.data
|
||||
this.listLoading10 = false
|
||||
})
|
||||
},
|
||||
// 查询标准件出库记录
|
||||
getStandardPartOut() {
|
||||
this.listLoading11 = true
|
||||
searchStandardPartOut(this.steamPartNumber).then(response => {
|
||||
this.StandardPartOut = response.data
|
||||
this.listLoading11 = false
|
||||
})
|
||||
},
|
||||
// 查询通用件
|
||||
searchGeneralPartinfo() {
|
||||
this.listLoading3 = true
|
||||
this.tableDataGeneral = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
searchGeneralPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataGeneral = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
this.listLoading3 = false
|
||||
})
|
||||
this.projectValue = ' '
|
||||
this.MachineValue = ' '
|
||||
this.GroupNumValue = ' '
|
||||
},
|
||||
// 查询基本件
|
||||
searchBasciPartinfo() {
|
||||
this.listLoading = true
|
||||
this.tableDataBasic = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
searchBasicPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataBasic = response.data.rows
|
||||
this.listLoading = false
|
||||
this.total = response.data.total
|
||||
})
|
||||
this.projectValue = ' '
|
||||
this.MachineValue = ' '
|
||||
this.GroupNumValue = ' '
|
||||
},
|
||||
// 查询基本件记录
|
||||
searchBasicPartRecord(row) {
|
||||
this.craftNumber = row.工艺计划流水号
|
||||
this.listLoading1 = true
|
||||
this.listLoading2 = true
|
||||
searchBasicPartIn(this.craftNumber).then(response => {
|
||||
this.listLoading1 = false
|
||||
this.BasicPartIn = response.data
|
||||
})
|
||||
searchBasicPartOut(this.craftNumber).then(response => {
|
||||
this.listLoading2 = false
|
||||
this.BasicPartOut = response.data
|
||||
})
|
||||
},
|
||||
// 查询通用件记录
|
||||
searchGeneralPartRecord(row) {
|
||||
this.listLoading4 = true
|
||||
this.listLoading5 = true
|
||||
this.craftNumber = row.工艺计划流水号
|
||||
searchBasicPartIn(this.craftNumber).then(response => {
|
||||
this.GeneralPartIn = response.data
|
||||
this.listLoading4 = false
|
||||
})
|
||||
searchBasicPartOut(this.craftNumber).then(response => {
|
||||
this.GeneralPartOut = response.data
|
||||
this.listLoading5 = false
|
||||
})
|
||||
},
|
||||
changesafeAmount(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.teamPartNumber = row.组件零件流水号
|
||||
},
|
||||
// 修改安全库存量
|
||||
edeitsafeAmount() {
|
||||
safeAmount(this.teamPartNumber, this.form.safeNumber).then(response => {
|
||||
this.dialogFormVisible2 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
this.form = {}
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
this.form = {}
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
tableRowClassName1({ row }) {
|
||||
if (row.安全库存量 > row.库存数量) {
|
||||
return 'background: #ff6666'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
tableRowClassName2({ row }) {
|
||||
const a = 0
|
||||
if (a >= row.可出库数量) {
|
||||
return 'background: #ff6666'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent1 = 1
|
||||
this.PageSize1 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.PageCurrent1 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.PageCurrent2 = 1
|
||||
this.PageSize2 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.PageCurrent2 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChange3(val) {
|
||||
this.PageCurrent3 = 1
|
||||
this.PageSize3 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.PageCurrent3 = val
|
||||
this.searchPartinfo()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
550
src/views/Inventory/InventoryManagement/index.vue
Normal file
550
src/views/Inventory/InventoryManagement/index.vue
Normal file
@@ -0,0 +1,550 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="ADD()">增加</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%;max-height: 400px"
|
||||
height="400"
|
||||
@row-click="getWarehouse">
|
||||
<el-table-column label="仓库编号" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.仓库编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库名称" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.仓库名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库描述" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.仓库描述 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="地址" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.地址 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系人" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.联系人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="budget" label="领用人" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领用人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row)">修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="ADDLocate()">增加</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData2"
|
||||
border
|
||||
style="width: 100%;max-height: 400px"
|
||||
height="400">
|
||||
<el-table-column label="货位名称" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作中心" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工作中心 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="永久" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.永久 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不可用量" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.不可用量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.仓库名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="handleLocateEdit(scope.row)">修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="locateDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<!--仓库表单-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="增加仓库" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库编号" prop="WarehouseNumber">
|
||||
<el-input
|
||||
v-model="form.WarehouseNumber"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库名称" prop="WarehouseName">
|
||||
<el-input
|
||||
v-model="form.WarehouseName"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库描述" prop="WarehouseDescription">
|
||||
<el-input
|
||||
v-model="form.WarehouseDescription"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="Address">
|
||||
<el-input
|
||||
v-model="form.Address"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in People"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="Note">
|
||||
<el-input
|
||||
v-model="form.Note"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--货位表单-->
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="货位" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="货位名称" prop="货位名称">
|
||||
<el-input
|
||||
v-model="form2.货位名称"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工作中心" prop="工作中心">
|
||||
<el-input
|
||||
v-model="form2.工作中心"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="永久" prop="永久">
|
||||
<el-input
|
||||
v-model="form2.永久"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="不可用量" prop="不可用量">
|
||||
<el-input
|
||||
v-model="form2.不可用量"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callLocateOff('form2')">取消</el-button>
|
||||
<el-button type="primary" @click="Locatesubmit('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { initWarehouse, addWarehouse, alterWarehouse, deleteWarehouse, searchLocate, addLocate, alterLocate, deleteLocate, searchPeople } from '@/api/Inventory/InventoryManagement'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
tableData2: [],
|
||||
wareHouse: '',
|
||||
dialogFormVisible: false, // 仓库表单
|
||||
temp: '',
|
||||
form: {
|
||||
WarehouseNumber: '', // 仓库编号
|
||||
WarehouseName: '', // 仓库名称
|
||||
WarehouseDescription: '', // 仓库描述
|
||||
Address: '', // 地址
|
||||
Note: '' // 备注
|
||||
},
|
||||
rules: { // 表单验证规则
|
||||
WarehouseNumber: [{ required: true, message: '请输入仓库编号', trigger: 'change' }],
|
||||
WarehouseName: [{ required: true, message: '请输入仓库名称', trigger: 'blur' }],
|
||||
WarehouseDescription: [{ required: true, message: '请输入仓库描述', trigger: 'blur' }],
|
||||
Address: [{ required: true, message: '请输入地址', trigger: 'blur' }],
|
||||
Note: [{ required: true, message: '请输入备注', trigger: 'blur' }]
|
||||
},
|
||||
dialogFormVisible2: false, // 货位表单
|
||||
form2: {
|
||||
货位名称: '',
|
||||
工作中心: '',
|
||||
永久: '',
|
||||
不可用量: ''
|
||||
},
|
||||
rules2: { // 表单验证规则
|
||||
货位名称: [{ required: true, message: '请输入货位名称', trigger: 'change' }],
|
||||
工作中心: [{ required: true, message: '请输入工作中心', trigger: 'blur' }],
|
||||
永久: [{ required: true, message: '请输入永久', trigger: 'blur' }],
|
||||
不可用量: [{ required: true, message: '请输入不可用量', trigger: 'blur' }]
|
||||
},
|
||||
HouseNumber: '',
|
||||
LocateNumber: '',
|
||||
listLoading: '',
|
||||
PeopleValue: '',
|
||||
People: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTable()
|
||||
this.searchPeopleData()
|
||||
},
|
||||
methods: {
|
||||
// 查询仓库
|
||||
getTable() {
|
||||
this.tableData = []
|
||||
this.listLoading = true
|
||||
initWarehouse().then(response => {
|
||||
this.listLoading = false
|
||||
console.log(response)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData.push({
|
||||
仓库流水号: response.data[i].仓库流水号,
|
||||
仓库编号: response.data[i].仓库编号,
|
||||
仓库名称: response.data[i].仓库名称,
|
||||
仓库描述: response.data[i].仓库描述,
|
||||
地址: response.data[i].地址,
|
||||
联系人: response.data[i].联系人,
|
||||
备注: response.data[i].备注
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getWarehouse(row) {
|
||||
this.wareHouse = row.仓库流水号
|
||||
this.getLocate()
|
||||
},
|
||||
searchPeopleData() { // 查询人员
|
||||
searchPeople().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.People.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].考勤编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getLocate() {
|
||||
this.tableData2 = []
|
||||
searchLocate(this.wareHouse).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData2.push({
|
||||
货位流水号: response.data[i].货位流水号,
|
||||
货位名称: response.data[i].货位名称,
|
||||
工作中心: response.data[i].工作中心,
|
||||
永久: response.data[i].永久,
|
||||
不可用量: response.data[i].不可用量,
|
||||
仓库名称: response.data[i].仓库名称
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击增加仓库
|
||||
ADD() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
this.temp = 1
|
||||
},
|
||||
// 提交添加或者修改仓库
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.temp === 1) {
|
||||
this.addTableData()
|
||||
this.form.WarehouseNumber = ''
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.Contactpeople = ''
|
||||
this.form.Note = ''
|
||||
this.temp = null
|
||||
} else if (this.temp === 2) {
|
||||
this.chaEdit()
|
||||
this.temp = null
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 执行增加仓库
|
||||
addTableData() {
|
||||
addWarehouse(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.PeopleValue, this.form.Note).then(response => {
|
||||
this.dialogFormVisible = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.form.WarehouseNumber = ''
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.Contactpeople = ''
|
||||
this.form.Note = ''
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
this.getTable()
|
||||
})
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.temp = 2
|
||||
this.dialogFormVisible = true
|
||||
this.form.WarehouseNumber = row.仓库编号
|
||||
this.form.WarehouseName = row.仓库名称
|
||||
this.form.WarehouseDescription = row.仓库描述
|
||||
this.form.Address = row.地址
|
||||
this.form.Contactpeople = row.联系人
|
||||
this.form.Note = row.备注
|
||||
this.HouseNumber = row.仓库流水号
|
||||
},
|
||||
// 执行修改
|
||||
chaEdit() {
|
||||
alterWarehouse(this.HouseNumber, this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.Contactpeople, this.form.Note).then(response => {
|
||||
this.dialogFormVisible = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.form.WarehouseNumber = ''
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.Contactpeople = ''
|
||||
this.form.Note = ''
|
||||
this.getTable()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除仓库
|
||||
handleDelete(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteWarehouse(row.仓库流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getTable()
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
console.log(1515)
|
||||
this.form = {}
|
||||
this.form2.ContractNumberValue = ''
|
||||
this.form2.EntryName = ''
|
||||
this.form2.TotalContractAmount = ''
|
||||
this.form.PaymentPhaseValue = 1
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 点击增加货位
|
||||
ADDLocate() {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.temp = 1
|
||||
},
|
||||
// 提交添加或者修改货位
|
||||
Locatesubmit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.temp === 1) {
|
||||
this.addLocateTable()
|
||||
this.form2.货位名称 = ''
|
||||
this.form2.工作中心 = ''
|
||||
this.form2.仓库流水号 = ''
|
||||
this.form2.永久 = ''
|
||||
this.form2.不可用量 = ''
|
||||
this.temp = null
|
||||
} else if (this.temp === 2) {
|
||||
this.LocateEdit()
|
||||
this.temp = null
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 执行增加货位
|
||||
addLocateTable() {
|
||||
addLocate(this.form2.货位名称, this.form2.工作中心, this.wareHouse, this.form2.永久, this.form2.不可用量).then(response => {
|
||||
this.dialogFormVisible2 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.form.货位名称 = ''
|
||||
this.form.工作中心 = ''
|
||||
this.form.仓库流水号 = ''
|
||||
this.form.永久 = ''
|
||||
this.form.不可用量 = ''
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
this.getLocate()
|
||||
})
|
||||
},
|
||||
// 编辑货位
|
||||
handleLocateEdit(row) {
|
||||
this.temp = 2
|
||||
this.form2.货位名称 = row.货位名称
|
||||
this.form2.工作中心 = row.工作中心
|
||||
this.form2.仓库流水号 = row.仓库流水号
|
||||
this.form2.永久 = row.永久
|
||||
this.form2.不可用量 = row.不可用量
|
||||
this.LocateNumber = row.货位流水号
|
||||
this.dialogFormVisible2 = true
|
||||
},
|
||||
// 执行修改货位
|
||||
LocateEdit() {
|
||||
alterLocate(this.LocateNumber, this.form2.货位名称, this.form2.工作中心, this.form2.仓库流水号, this.form2.永久, this.form2.不可用量).then(response => {
|
||||
this.dialogFormVisible2 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.form.货位名称 = ''
|
||||
this.form.工作中心 = ''
|
||||
this.form.仓库流水号 = ''
|
||||
this.form.永久 = ''
|
||||
this.form.不可用量 = ''
|
||||
this.getLocate()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除货位
|
||||
locateDelete(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteLocate(row.货位流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getLocate()
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callLocateOff(formName) {
|
||||
this.form2 = {}
|
||||
this.form2.货位名称 = ''
|
||||
this.form2.工作中心 = ''
|
||||
this.form2.仓库流水号 = ''
|
||||
this.form.永久 = ''
|
||||
this.form.不可用量 = ''
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
296
src/views/Inventory/OfflinePartOut/index.vue
Normal file
296
src/views/Inventory/OfflinePartOut/index.vue
Normal file
@@ -0,0 +1,296 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableDataBasic"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="parOut(scope.row)">出库</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="searchoutRecord(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<!--零件出库对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="零件出库" center width="380px">
|
||||
<el-form ref="form" :model="Project" :rules="rules" label-position="left">
|
||||
<el-form-item label="项目" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="form.ProjectValue" filterable clearable size="small" placeholder="项目" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="机床" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分组" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.DirectNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in People"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.DirectNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="addDirectPartm()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="tableDataOut"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchPart, searchPeople, outlinePartOut, outRecord } from '@/api/Inventory/OfflinePartOut'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Project: [],
|
||||
ProjectValue_check: 1,
|
||||
MachineValue: ' ',
|
||||
Machine: [],
|
||||
MachineValue_check: 1,
|
||||
GroupNumValue: ' ',
|
||||
GroupNumValue_check: 1,
|
||||
GroupNum: [],
|
||||
tableDataBasic: [],
|
||||
People: [],
|
||||
PeopleValue: '',
|
||||
dialogFormVisible: false,
|
||||
form: {
|
||||
ProjectValue: '',
|
||||
DirectNumber: '',
|
||||
DirectNote: ''
|
||||
},
|
||||
rules: { // 表单验证规则
|
||||
ProjectValue: [{ required: true, message: '请选择项目', trigger: 'blur' }],
|
||||
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }],
|
||||
DirectNote: [{ required: true, message: '请输入直达件备注', trigger: 'change' }]
|
||||
},
|
||||
contractNumber: '',
|
||||
locateNumber: '',
|
||||
materialNumber: '',
|
||||
PeopleNumber: '',
|
||||
tableDataOut: [],
|
||||
listLoading: '',
|
||||
listLoading1: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchPurchasePartinfo()
|
||||
this.fetchData()
|
||||
this.searchPeopleData()
|
||||
this.getpeopleid()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
||||
},
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.PeopleNumber = this.id
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
console.log(1351)
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.form.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组件名称,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 离线件查询
|
||||
searchPurchasePartinfo() {
|
||||
this.listLoading = true
|
||||
this.tableDataBasic = []
|
||||
searchPart().then(response => {
|
||||
this.tableDataBasic = response.data
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 离线记录查询
|
||||
searchoutRecord(row) {
|
||||
this.contractNumber = row.离线合同明细流水号
|
||||
this.listLoading1 = true
|
||||
outRecord(this.contractNumber).then(response => {
|
||||
this.tableDataOut = response.data
|
||||
this.listLoading1 = false
|
||||
})
|
||||
},
|
||||
// 打开表单
|
||||
parOut(row) {
|
||||
this.form = []
|
||||
this.MachineValue = ''
|
||||
this.GroupNumValue = ''
|
||||
this.dialogFormVisible = true
|
||||
this.contractNumber = row.离线合同明细流水号
|
||||
this.locateNumber = row.货位流水号
|
||||
this.materialNumber = row.物料流水号
|
||||
this.searchoutRecord()
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
this.form.DirectNumber = ''
|
||||
this.form.DirectNumberx = ''
|
||||
this.form.DirectNote = ''
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
searchPeopleData() { // 查询人员
|
||||
searchPeople().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.People.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].考勤编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 离线外购件出库
|
||||
addDirectPartm() {
|
||||
console.log(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber)
|
||||
outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.searchDirect()
|
||||
} else {
|
||||
this.$message.error('信息添加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
197
src/views/Inventory/PartOut/index.vue
Normal file
197
src/views/Inventory/PartOut/index.vue
Normal 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>
|
||||
875
src/views/Inventory/PickingList/index.vue
Normal file
875
src/views/Inventory/PickingList/index.vue
Normal file
@@ -0,0 +1,875 @@
|
||||
<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-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="addListinfor()">创建</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="downLoadCjn()">导出</el-button>
|
||||
<el-table
|
||||
v-loading="listLoading2"
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200"
|
||||
@row-click = "searchListDetailt()">
|
||||
<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>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropListinfor(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total2"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading3"
|
||||
: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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="100">
|
||||
<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="50">
|
||||
<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="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 10px 10px" @click="editListDetailx(scope.row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 10px 10px" @click="dropListdetail(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPartinfo()">查询</el-button><br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableDataBasic"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.可出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="80">
|
||||
<template slot-scope="scope" align="center">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope" align="center">
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="80">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addBasicListDetailinfor(scope.row)">领料</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="tableDataPurchase"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="80">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addListDetailinfor(scope.row)">领料</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoadingx"
|
||||
:data="tableDataHouse"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="80">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addWorkshopDetailinfor(scope.row)">领料</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrentx"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="totalx"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChangex"
|
||||
@current-change="handleCurrentChangex"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<!--基本件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="基本件通用件领料" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="addBasicListDetail()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--外购件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="外购件标准件领料" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="execaddListDetail()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--车间采购件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisibleWork" title="车间采购件领料" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="addWorkshopListDetail()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--编辑领料明细对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="领料单明细" center width="380px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form2.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form2.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form2')">取消</el-button>
|
||||
<el-button type="primary" @click="submitChannge()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--领料单-->
|
||||
<!--<el-card v-show="card">-->
|
||||
<!--<table cellspacing="0px" align="center" id="cjn" width="100%" style="">-->
|
||||
<!--<tbody id="1">-->
|
||||
<!--<tr>-->
|
||||
<!--<td colspan="4" style="text-align: left;font-size: 30px;font-weight: bold">GAOJING</td>-->
|
||||
<!--<td colspan="24" style="text-align:center;font-size: 30px;font-weight: bold">领料单</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr class="tbodyHead">-->
|
||||
<!--<td colspan="2">领料单号:</td>-->
|
||||
<!--<td colspan="6">{{任务单号}}</td>-->
|
||||
<!--<td colspan="4">领料日期:</td>-->
|
||||
<!--<td colspan="4">{{任务下达日期}}</td>-->
|
||||
<!--<td colspan="3">领料人:</td>-->
|
||||
<!--<td colspan="9">{{外协厂家}}</td>-->
|
||||
<!--</tr>-->
|
||||
<!--<tr id="tableHead">-->
|
||||
<!--<td style="width: 2%">序号</td>-->
|
||||
<!--<td colspan="5">物料型号</td>-->
|
||||
<!--<td colspan="2" style="width: 4%">物料名称</td>-->
|
||||
<!--<td colspan="2" style="width: 4%">物料规格</td>-->
|
||||
<!--<td colspan="9" width="30%">数量</td>-->
|
||||
<!--<td colspan="1">项目名称</td>-->
|
||||
<!--<td>机床名称</td>-->
|
||||
<!--<td>组件名称</td>-->
|
||||
<!--<td>备注</td>-->
|
||||
<!--</tr>-->
|
||||
<!--</tbody>-->
|
||||
<!--</table>-->
|
||||
<!--</el-card>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchList, addList, dropList, addListDetail, searchListDetail, dropListDetail, editListDetail, searchHoursePart } from '@/api/Inventory/PickingList'
|
||||
import { mapGetters } from 'vuex'
|
||||
// import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
|
||||
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: '', // 分组名称
|
||||
form: {
|
||||
OutNumber: '', // 出库数量
|
||||
outNote: '' // 出库备注
|
||||
},
|
||||
rules: { // 表单验证规则
|
||||
OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }],
|
||||
outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }]
|
||||
},
|
||||
form2: {
|
||||
OutNumber: '', // 出库数量
|
||||
outNote: '' // 出库备注
|
||||
},
|
||||
rules2: { // 表单验证规则
|
||||
OutNumber: [{ required: true, message: '请输入出库数量', trigger: 'blur' }],
|
||||
outNote: [{ required: true, message: '请输入出库备注', trigger: 'blur' }]
|
||||
},
|
||||
partType: '', // 零件类型
|
||||
craftplannumber: '', // 工艺计划流水号
|
||||
receive: '', // 收件信息ID
|
||||
teamPart: '', // 组件零件流水号
|
||||
locatenumber: '', // 货位流水号
|
||||
listLoading: false,
|
||||
listLoading1: false,
|
||||
listLoading2: false,
|
||||
listLoading3: false,
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: null,
|
||||
PageCurrent1: 1,
|
||||
PageSize1: 10,
|
||||
total1: null,
|
||||
PageCurrent2: 1,
|
||||
PageSize2: 10,
|
||||
total2: null,
|
||||
PageCurrent3: 1,
|
||||
PageSize3: 10,
|
||||
total3: null,
|
||||
PageCurrentx: 1,
|
||||
PageSizex: 10,
|
||||
totalx: null,
|
||||
materialName: '',
|
||||
materialNumber: '',
|
||||
materialType: '',
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
card: true,
|
||||
pickingListDetail: '',
|
||||
tableDataHouse: [],
|
||||
listLoadingx: '',
|
||||
purchaseDetailNum: '',
|
||||
dialogFormVisibleWork: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.getpeopleid()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
||||
},
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.picikingPeople = this.id
|
||||
console.log(this.picikingPeople)
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组件名称,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchPartinfo() {
|
||||
this.tableDataPurchase = []
|
||||
this.tableDataBasic = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
this.listLoading = true
|
||||
this.listLoading1 = true
|
||||
this.listLoadingx = true
|
||||
searchPurchasePart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
console.log(response)
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.listLoading = false
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataBasic = response.data.rows
|
||||
this.listLoading1 = false
|
||||
this.total = response.data.total
|
||||
console.log(response)
|
||||
})
|
||||
searchHoursePart(this.PageCurrentx, this.PageSizex, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataHouse = response.data.rows
|
||||
this.listLoadingx = false
|
||||
this.totalx = response.data.total
|
||||
console.log(response)
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent1 = 1
|
||||
this.PageSize1 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.PageCurrent1 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChangex(val) {
|
||||
this.PageCurrentx = 1
|
||||
this.PageSizex = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChangex(val) {
|
||||
this.PageCurrentx = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
// 查询领料单
|
||||
searchListinfor() {
|
||||
this.listLoading2 = true
|
||||
searchList(this.PageCurrent2, this.PageSize2, this.pickingListNumber).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.PageCurrent2 = 1
|
||||
this.PageSize2 = val
|
||||
this.searchListinfor()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.PageCurrent2 = val
|
||||
this.searchListinfor()
|
||||
},
|
||||
// 查询领料单明细
|
||||
searchListDetailt() {
|
||||
this.listLoading3 = true
|
||||
searchListDetail(this.pickingListNumberx).then(response => {
|
||||
console.log(response)
|
||||
this.tableDataPicking = response.data
|
||||
this.listLoading3 = false
|
||||
})
|
||||
},
|
||||
// 增加领料单
|
||||
addListinfor() {
|
||||
addList(this.picikingPeople).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchListinfor()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除领料单
|
||||
dropListinfor(row) {
|
||||
this.pickingListNumberx = row.领料单流水号
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
dropList(this.pickingListNumberx).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchListinfor()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 删除领料单明细
|
||||
dropListdetail(row) {
|
||||
this.pickingListDetail = row.领料单明细流水号
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
dropListDetail(this.pickingListDetail).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchListDetailt()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 选择领料单
|
||||
chooseListinfor(row) {
|
||||
this.pickingListNumberx = row.领料单流水号
|
||||
},
|
||||
// 增加基本件领料单明细
|
||||
addBasicListDetailinfor(row) {
|
||||
this.form = []
|
||||
this.partProjectNumber = row.项目流水号
|
||||
this.partProjectName = row.项目名称
|
||||
this.partMachineNumber = row.机床流水号
|
||||
this.partMachineName = row.机床名称
|
||||
this.partGroupNumber = row.组件流水号
|
||||
this.partGroupName = row.组件名称
|
||||
this.partType = row.零件类型
|
||||
this.craftplannumber = row.工艺计划流水号
|
||||
this.receive = row.收件信息id
|
||||
this.teamPart = row.组件零件流水号
|
||||
this.locatenumber = row.货位流水号
|
||||
this.materialName = row.零件名称
|
||||
this.materialNumber = row.零件图号
|
||||
this.dialogFormVisible1 = true
|
||||
this.materialName = row.零件名称
|
||||
this.materialType = row.零件类型名称
|
||||
this.materialNumber = row.零件图号
|
||||
console.log(this.receive, 41645)
|
||||
},
|
||||
addBasicListDetail() {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} if (this.form.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
}
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible1 = false
|
||||
this.searchListinfor()
|
||||
},
|
||||
// 增加外购件领料单明细
|
||||
addListDetailinfor(row) {
|
||||
this.form = []
|
||||
this.partProjectNumber = row.项目流水号
|
||||
this.partProjectName = row.项目名称
|
||||
this.partMachineNumber = row.机床流水号
|
||||
this.partMachineName = row.机床名称
|
||||
this.partGroupNumber = row.组件流水号
|
||||
this.partGroupName = row.组件名称
|
||||
this.partType = row.零件类型代码
|
||||
this.craftplannumber = row.工艺计划流水号
|
||||
this.receive = row.收件信息ID
|
||||
this.teamPart = row.组件零件流水号
|
||||
this.locatenumber = row.货位流水号
|
||||
this.materialName = row.物料名称
|
||||
this.materialNumber = row.物料型号
|
||||
this.materialType = row.物料规格
|
||||
this.dialogFormVisible = true
|
||||
this.purchaseDetailNum = row.采购合同明细流水号
|
||||
},
|
||||
execaddListDetail() {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} else if (this.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
} else {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dialogFormVisible = false
|
||||
this.searchListinfor()
|
||||
},
|
||||
// 增加车间采购领料单明细
|
||||
addWorkshopDetailinfor(row) {
|
||||
this.form = []
|
||||
this.partProjectNumber = row.项目流水号
|
||||
this.partProjectName = row.项目名称
|
||||
this.partMachineNumber = row.机床流水号
|
||||
this.partMachineName = row.机床名称
|
||||
this.partGroupNumber = row.组件流水号
|
||||
this.partGroupName = row.组件名称
|
||||
this.partType = row.零件类型
|
||||
this.receive = row.收件信息ID
|
||||
this.locatenumber = row.货位流水号
|
||||
this.materialName = row.物料名称
|
||||
this.materialNumber = row.物料型号
|
||||
this.materialType = row.物料规格
|
||||
this.dialogFormVisibleWork = true
|
||||
this.purchaseDetailNum = row.采购合同明细流水号
|
||||
},
|
||||
addWorkshopListDetail() {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} else if (this.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
} else {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dialogFormVisibleWork = false
|
||||
this.searchListinfor()
|
||||
},
|
||||
// 修改领料单明细
|
||||
editListDetailx(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.pickingListDetail = row.领料单明细流水号
|
||||
},
|
||||
submitChannge() {
|
||||
editListDetail(this.pickingListDetail, this.form2.OutNumber, this.form2.outNote).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible2 = false
|
||||
this.searchListDetailt()
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
this.form.DirectNumber = ''
|
||||
this.form.DirectNote = ''
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible2 = false
|
||||
this.dialogFormVisibleWork = false
|
||||
this.form2.OutNumber = ''
|
||||
this.form2.outNote = ''
|
||||
},
|
||||
// 导出状态
|
||||
handleDownload() {
|
||||
searchListDetail(this.pickingListNumberx).then(response => {
|
||||
return response.data
|
||||
}).then(data => {
|
||||
const a = data
|
||||
require.ensure([], () => {
|
||||
const { export_json_to_excel } = require('@/vendor/Export2Excel')
|
||||
const tHeader = ['物料名称', '物料型号', '物料规格', '项目名称', '机床名称', '组件名称', '领用数量', '备注']
|
||||
const filterVal = ['物料名称', '物料型号', '物料规格', '项目名称', '机床名称', '组件名称', '领用数量', '备注']
|
||||
const list = a
|
||||
const data = this.formatJson(filterVal, list)
|
||||
export_json_to_excel(tHeader, data, '领料单')
|
||||
})
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => v[j]))
|
||||
}
|
||||
// downLoadCjn(tableid) {
|
||||
// if (this.List3.length === 0) {
|
||||
// this.$message.warning('暂无数据')
|
||||
// } else {
|
||||
// getExplorer()
|
||||
// method5(tableid)
|
||||
// Cleanup()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
103
src/views/Inventory/SubPartCome/index.vue
Normal file
103
src/views/Inventory/SubPartCome/index.vue
Normal file
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span style="margin: 5px">替换单编号</span>
|
||||
<el-input v-model="substituteNumber" clearable size="small" style="width:200px" />
|
||||
<span style="margin: 5px">零件图号</span>
|
||||
<el-input v-model="partNumber" clearable size="small" style="width:200px" />
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getSubstitutedCard()">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableDataExchange"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="450">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="替换单编号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.替换单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="替换件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.替换件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="被替换件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.被替换件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="替换数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.替换数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-back" style="margin: 0 0 0 0px" @click="substitutePart(scope.row)">替换件到货</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSubstitutedCard, SubstitutedCome } from '@/api/Inventory/SubPartCome'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableDataExchange: [],
|
||||
substituteNumber: '',
|
||||
partNumber: '',
|
||||
listLoading: '',
|
||||
subList: '',
|
||||
locateNumber: '',
|
||||
subNumber: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 替换单查询
|
||||
getSubstitutedCard() {
|
||||
this.listloading = true
|
||||
searchSubstitutedCard().then(response => {
|
||||
this.tableDataExchange = response.data
|
||||
this.listloading = false
|
||||
})
|
||||
},
|
||||
// 替换件到货
|
||||
substitutePart(row) {
|
||||
this.subList = row.替换单流水号
|
||||
this.locateNumber = row.物料与货位对照流水号
|
||||
this.subNumber = row.替换数量
|
||||
SubstitutedCome(this.subList, this.locateNumber, this.subNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('到货替换成功')
|
||||
} else { this.$message.error('到货替换失败') }
|
||||
})
|
||||
this.getSubstitutedCard()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
488
src/views/Inventory/SubstitutePart/index.vue
Normal file
488
src/views/Inventory/SubstitutePart/index.vue
Normal file
@@ -0,0 +1,488 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in GroupNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total = 0;pageSize = 10;pageList = 1;searchPartinfo()">查询</el-button><br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableDataPurchase"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-sort-down" style="margin: 0 0 0 0px" @click="selecting(scope.row)">替换</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="100"
|
||||
>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div style="margin: 0px 15px">
|
||||
<el-button size="small" type="warning" icon="el-icon-edit" @click="addSub()" >替换件</el-button>
|
||||
</div>
|
||||
<div style="margin: 10px 15px">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" @click="exchange()" >替换</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<div>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="100">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--新增替换件对话框-->
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="替换单编号" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.ExchangeNumber" size="small" placeholder="请输入零件替换单编号" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="替换数量" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNumberx" size="small" placeholder="请输入替换数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button v-show="title==='替换'" type="primary" @click="addListDetailinfor('form')">确 定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--选择替换件-->
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="新增替换件" center width="600px">
|
||||
<el-form :rules="rules" label-position="left">
|
||||
<el-form-item label="物料名称" prop="ContractNumberValue" label-width="150px" size="small">
|
||||
<el-input v-model="form.ExchangeNumber" size="small" placeholder="物料名称" style="width: 200px"/>
|
||||
<el-button type="primary" @click="getSubstituted()">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-table
|
||||
:data="tableDataSub"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="100">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-sort-down" style="margin: 0 0 0 0px" @click="selected(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="chooseSub()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="tableDataExchange"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="替换单编号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.替换单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="替换件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.替换件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="被替换件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.被替换件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="替换数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.替换数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchSubstituted, addSubstitutepart, searchSubstitutedCard, deleteSubstitutedCard, editSubstitutedCard } from '@/api/Inventory/SubstitutePart'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ProjectValue: ' ',
|
||||
Project: [],
|
||||
ProjectValue_check: 1,
|
||||
MachineValue: ' ',
|
||||
Machine: [],
|
||||
MachineValue_check: 1,
|
||||
GroupNumValue: ' ',
|
||||
GroupNumValue_check: 1,
|
||||
GroupNum: [],
|
||||
tableDataPurchase: [],
|
||||
tableDataExchange: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
listNumber: '',
|
||||
picikingPeople: '', // 领料人流水号
|
||||
partProjectNumber: '', // 项目流水号
|
||||
partProjectName: '', // 项目名称
|
||||
partMachineNumber: '', // 机床流水号
|
||||
partMachineName: '', // 机床名称
|
||||
partGroupNumber: '', // 分组流水号
|
||||
partGroupName: '', // 分组名称
|
||||
OutNumber: '', // 出库数量
|
||||
outNote: '', // 出库备注
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible2: false,
|
||||
arr: [],
|
||||
tableDataSub: [],
|
||||
form: {
|
||||
ExchangeNumber: '', // 交换件编号
|
||||
ExchangeNumberx: '', // 交换件数量
|
||||
ExchangeNote: '' // 交换件备注
|
||||
},
|
||||
rules: { // 表单验证规则
|
||||
ExchangeNumber: [{ required: true, message: '请输入交换件编号', trigger: 'blur' }],
|
||||
ExchangeNumberx: [{ required: true, message: '请输入交换件数量', trigger: 'blur' }],
|
||||
ExchangeNote: [{ required: true, message: '请输入交换件备注', trigger: 'change' }]
|
||||
},
|
||||
listLoading: '',
|
||||
listLoading1: '',
|
||||
substituteListNumber: '',
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.getSubstitutedCard()
|
||||
this.getpeopleid()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
||||
},
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.picikingPeople = this.id
|
||||
console.log(this.picikingPeople)
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组件名称,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 被替换件查询
|
||||
searchPartinfo() {
|
||||
this.tableDataPurchase = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
this.listLoading = true
|
||||
searchPurchasePart(this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataPurchase = response.data
|
||||
console.log(this.tableDataPurchase)
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible2 = false
|
||||
},
|
||||
addSub() {
|
||||
this.dialogFormVisible2 = true
|
||||
},
|
||||
// 被替换件查询
|
||||
getSubstituted() {
|
||||
searchSubstituted().then(response => {
|
||||
this.tableDataSub = response.data
|
||||
})
|
||||
},
|
||||
// 替换单查询
|
||||
getSubstitutedCard() {
|
||||
this.listLoading1 = true
|
||||
searchSubstitutedCard().then(response => {
|
||||
this.tableDataExchange = response.data
|
||||
this.listLoading1 = false
|
||||
})
|
||||
},
|
||||
// 选中零件交换
|
||||
selecting(row) {
|
||||
const arr = new Array(row)
|
||||
this.tableData1 = arr
|
||||
console.log(this.tableData1)
|
||||
},
|
||||
// 选中被零件交换
|
||||
selected(row) {
|
||||
const arr = new Array(row)
|
||||
this.tableData2 = arr
|
||||
},
|
||||
// 确认选择零件
|
||||
chooseSub() {
|
||||
this.dialogFormVisible2 = false
|
||||
},
|
||||
// 增加交换件
|
||||
addListDetailinfor() {
|
||||
addSubstitutepart(this.tableData2[0].离线合同明细流水号, this.tableData1[0].组件零件流水号, this.form.ExchangeNumber, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.picikingPeople, this.form.ExchangeNumberx, this.form.ExchangeNote).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.getSubstitutedCard()
|
||||
},
|
||||
// 打开替换表单
|
||||
exchange() {
|
||||
this.form = []
|
||||
this.dialogFormVisible = true
|
||||
this.title = '替换'
|
||||
},
|
||||
// 删除替换单
|
||||
dropListinfor(row) {
|
||||
this.substituteListNumber = row.替换单流水号
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteSubstitutedCard(this.substituteListNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.getSubstitutedCard().then(response => {
|
||||
})
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.substituteListNumber = row.替换单流水号
|
||||
this.form.ExchangeNumber = row.替换单编号
|
||||
this.form.ExchangeNumberx = row.替换数量
|
||||
this.form.ExchangeNote = row.备注
|
||||
this.title = '编辑'
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
submitEdit() {
|
||||
this.editTable(editSubstitutedCard, [this.substituteListNumber, this.form.ExchangeNumber, this.form.ExchangeNumberx, this.form.ExchangeNote], 'form', function() { this.getSubstitutedCard(); this.dialogFormVisible = false })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
259
src/views/Inventory/genneralPart/index.vue
Normal file
259
src/views/Inventory/genneralPart/index.vue
Normal file
@@ -0,0 +1,259 @@
|
||||
<template>
|
||||
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<span style="margin: 5px">零件图号</span>
|
||||
<el-input v-model="partNumber" clearable size="small" style="width:200px" />
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getscantable()">查询</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-remove-outline" style="margin: 0 0 0 10px" @click="Empty()">清空</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%;height: 650px" >
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="计划数量" align="center" min-width="100">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-input v-model="tableData[scope.$index].plannumber" readonly size="small"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].innumber" clearable size="small"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="inventoryNumber" filterable clearable size="small" placeholder="仓库名称" @change="Getlocate">
|
||||
<el-option
|
||||
v-for="item in inventoryName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="货位" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="locateNumber" filterable clearable size="small" placeholder="货位名称">
|
||||
<el-option
|
||||
v-for="item in locateName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-input v-model="tableData[scope.$index].note" clearable size="small"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete(scope.$index, scope.row)">移除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable, insertOne, getinventory, getlocate } from '@/api/Inventory/Inboundscanning'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { wsuri, name } from '@/utils/request'
|
||||
import print from '@/vendor/print'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ace: 0,
|
||||
a: '',
|
||||
tableData: [],
|
||||
partNumber: '',
|
||||
listLoading: false,
|
||||
craftplannumber: '',
|
||||
radio2: 3,
|
||||
PeopleNumber: '',
|
||||
inventoryName: [], // 仓库名称下拉框
|
||||
inventoryNumber: '',
|
||||
locateName: [], // 货位名称下拉框
|
||||
locateNumber: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.initWebpack()
|
||||
this.getpeopleid()
|
||||
this.Getinvent()
|
||||
},
|
||||
methods: {
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.tableData.splice(index, 1)
|
||||
this.$message({
|
||||
message: '已被成功移除',
|
||||
type: 'success'
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.PeopleNumber = this.id
|
||||
},
|
||||
aaa() {
|
||||
print('#print')
|
||||
},
|
||||
initWebpack() { // 初始化websocket
|
||||
this.websock = new WebSocket(wsuri)// 这里面的this都指向vue
|
||||
this.websock.onopen = this.websocketopen
|
||||
this.websock.onmessage = this.websocketonmessage
|
||||
this.websock.onclose = this.websocketclose
|
||||
this.websock.onerror = this.websocketerror
|
||||
},
|
||||
websocketopen() { // 打开
|
||||
console.log('WebSocket连接成功')
|
||||
this.websock.send('{<' + name + '>}')
|
||||
},
|
||||
websocketonmessage(msg) { // 数据接收
|
||||
this.partNumber = msg.data.split('|')[3]
|
||||
this.getscantable()
|
||||
},
|
||||
websocketclose() { // 关闭
|
||||
console.log('WebSocket关闭')
|
||||
},
|
||||
websocketerror() { // 失败
|
||||
console.log('WebSocket连接失败')
|
||||
},
|
||||
// 扫描查询
|
||||
getscantable() {
|
||||
if (this.partNumber === '') {
|
||||
this.$message.error('请输入零件号')
|
||||
} else {
|
||||
this.listLoading = true
|
||||
searchTable(this.partNumber).then(response => {
|
||||
if (response.data.length === 0) {
|
||||
this.listLoading = false
|
||||
this.$message.warning('无此零件')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) {
|
||||
this.ace = this.ace + 1
|
||||
}
|
||||
}
|
||||
if (this.ace === 0) {
|
||||
this.tableData.push({
|
||||
plannumber: response.data[0].剩余数量,
|
||||
innumber: response.data[0].入库数量,
|
||||
capture: '',
|
||||
note: '',
|
||||
工艺计划流水号: response.data[0].工艺计划流水号,
|
||||
项目名称: response.data[0].项目名称,
|
||||
机床图号: response.data[0].机床图号,
|
||||
零件图号: response.data[0].零件图号
|
||||
})
|
||||
} else {
|
||||
this.$message.error('此件已在列表中')
|
||||
}
|
||||
}
|
||||
}).then(() => {
|
||||
this.listLoading = false
|
||||
this.ace = 0
|
||||
})
|
||||
}
|
||||
},
|
||||
// 修改入库
|
||||
Innumber() {
|
||||
this.$confirm('此操作将不可逆转,且如果入库数量大于计划数量,则全部入库,是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].innumber > this.tableData[i].plannumber) {
|
||||
this.tableData[i].innumber = this.tableData[i].plannumber
|
||||
}
|
||||
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '零件入库成功!'
|
||||
})
|
||||
}).then(() => {
|
||||
this.Empty()
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消入库'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 清空
|
||||
Empty() {
|
||||
this.tableData = []
|
||||
},
|
||||
// 仓库查询
|
||||
Getinvent() {
|
||||
this.getSelect(getinventory, ['仓库名称', '仓库流水号'], 'inventoryName')
|
||||
},
|
||||
// 根据项目获取机床
|
||||
Getlocate() {
|
||||
this.locateName = []
|
||||
this.locateNumber = ''
|
||||
if (this.inventoryNumber) {
|
||||
this.getSelect(getlocate, ['货位名称'], 'locateName', this.inventoryNumber)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user