lixin
This commit is contained in:
@@ -36,13 +36,14 @@ export function searchTeam(machineNumber) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 初始化物料
|
// 初始化物料
|
||||||
export function searchPart() {
|
export function searchPart(data1) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '库存管理_离线外购件_出库查询'
|
name: '库存管理_离线外购件_出库查询',
|
||||||
|
param: '离线合同编号=' + data1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<span style="margin: 5px">离线合同编号</span>
|
||||||
|
<el-input v-model="offlineContract" clearable size="small" style="width:200px" />
|
||||||
|
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPurchasePartinfo()">查询</el-button>
|
||||||
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
@@ -152,156 +157,157 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initProject, searchmachine, searchTeam, searchPart, searchPeople, outlinePartOut, outRecord } from '@/api/Inventory/OfflinePartOut'
|
import { initProject, searchmachine, searchTeam, searchPart, searchPeople, outlinePartOut, outRecord } from '@/api/Inventory/OfflinePartOut'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
Project: [],
|
Project: [],
|
||||||
ProjectValue_check: 1,
|
ProjectValue_check: 1,
|
||||||
MachineValue: ' ',
|
MachineValue: ' ',
|
||||||
Machine: [],
|
Machine: [],
|
||||||
MachineValue_check: 1,
|
MachineValue_check: 1,
|
||||||
GroupNumValue: ' ',
|
GroupNumValue: ' ',
|
||||||
GroupNumValue_check: 1,
|
GroupNumValue_check: 1,
|
||||||
GroupNum: [],
|
GroupNum: [],
|
||||||
tableDataBasic: [],
|
tableDataBasic: [],
|
||||||
People: [],
|
People: [],
|
||||||
PeopleValue: '',
|
PeopleValue: '',
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
form: {
|
form: {
|
||||||
ProjectValue: '',
|
ProjectValue: '',
|
||||||
DirectNumber: '',
|
DirectNumber: '',
|
||||||
DirectNote: ''
|
DirectNote: ''
|
||||||
},
|
},
|
||||||
rules: { // 表单验证规则
|
rules: { // 表单验证规则
|
||||||
ProjectValue: [{ required: true, message: '请选择项目', trigger: 'blur' }],
|
ProjectValue: [{ required: true, message: '请选择项目', trigger: 'blur' }],
|
||||||
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }],
|
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }],
|
||||||
DirectNote: [{ required: true, message: '请输入直达件备注', trigger: 'change' }]
|
DirectNote: [{ required: true, message: '请输入直达件备注', trigger: 'change' }]
|
||||||
},
|
},
|
||||||
contractNumber: '',
|
contractNumber: '',
|
||||||
locateNumber: '',
|
locateNumber: '',
|
||||||
materialNumber: '',
|
materialNumber: '',
|
||||||
PeopleNumber: '',
|
PeopleNumber: '',
|
||||||
tableDataOut: [],
|
tableDataOut: [],
|
||||||
listLoading: '',
|
listLoading: '',
|
||||||
listLoading1: '',
|
listLoading1: '',
|
||||||
partnumber: ''
|
partnumber: '',
|
||||||
}
|
offlineContract: null // 离线合同编号
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters([
|
|
||||||
'id',
|
|
||||||
'token'
|
|
||||||
])
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.searchPurchasePartinfo()
|
|
||||||
this.fetchData()
|
|
||||||
this.searchPeopleData()
|
|
||||||
this.getpeopleid()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
fetchData() {
|
|
||||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
|
||||||
},
|
|
||||||
// 获取人员编号
|
|
||||||
getpeopleid() {
|
|
||||||
this.PeopleNumber = this.id
|
|
||||||
},
|
|
||||||
searchMachine() { // 查询机床
|
|
||||||
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++) {
|
computed: {
|
||||||
this.Machine.push({
|
...mapGetters([
|
||||||
label: response.data[i].机床图号,
|
'id',
|
||||||
value: response.data[i].机床流水号
|
'token'
|
||||||
})
|
])
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.searchPurchasePartinfo()
|
||||||
|
this.fetchData()
|
||||||
|
this.searchPeopleData()
|
||||||
|
this.getpeopleid()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fetchData() {
|
||||||
|
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
||||||
|
},
|
||||||
|
// 获取人员编号
|
||||||
|
getpeopleid() {
|
||||||
|
this.PeopleNumber = this.id
|
||||||
|
},
|
||||||
|
searchMachine() { // 查询机床
|
||||||
|
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++) {
|
||||||
searchGroupList() { // 查询组号
|
this.Machine.push({
|
||||||
searchTeam(this.MachineValue).then(response => {
|
label: response.data[i].机床图号,
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
value: response.data[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.partnumber = row.货位存量
|
|
||||||
this.searchoutRecord()
|
|
||||||
},
|
|
||||||
// 重置表单
|
|
||||||
callOff() {
|
|
||||||
this.form.DirectNumber = ''
|
|
||||||
this.form.DirectNumberx = ''
|
|
||||||
this.form.DirectNote = ''
|
|
||||||
this.dialogFormVisible = false
|
|
||||||
},
|
|
||||||
searchPeopleData() { // 查询人员
|
|
||||||
searchPeople(this.token).then(response => {
|
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
|
||||||
this.People.push({
|
|
||||||
label: response.data[i].姓名,
|
|
||||||
value: response.data[i].考勤编号
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 离线外购件出库
|
|
||||||
addDirectPartm() {
|
|
||||||
if (this.partnumber < this.form.DirectNumber) {
|
|
||||||
this.$message.error('请正确输入数量')
|
|
||||||
} else {
|
|
||||||
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.$message.success('零件出库成功')
|
|
||||||
this.dialogFormVisible = false
|
|
||||||
this.searchPurchasePartinfo()
|
|
||||||
outRecord(this.contractNumber).then(response => {
|
|
||||||
this.tableDataOut = response.data
|
|
||||||
this.listLoading1 = false
|
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
this.$message.error('零件出库失败')
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
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(this.offlineContract).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.partnumber = row.货位存量
|
||||||
|
this.searchoutRecord()
|
||||||
|
},
|
||||||
|
// 重置表单
|
||||||
|
callOff() {
|
||||||
|
this.form.DirectNumber = ''
|
||||||
|
this.form.DirectNumberx = ''
|
||||||
|
this.form.DirectNote = ''
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
|
},
|
||||||
|
searchPeopleData() { // 查询人员
|
||||||
|
searchPeople(this.token).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.People.push({
|
||||||
|
label: response.data[i].姓名,
|
||||||
|
value: response.data[i].考勤编号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 离线外购件出库
|
||||||
|
addDirectPartm() {
|
||||||
|
if (this.partnumber < this.form.DirectNumber) {
|
||||||
|
this.$message.error('请正确输入数量')
|
||||||
|
} else {
|
||||||
|
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.$message.success('零件出库成功')
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
this.searchPurchasePartinfo()
|
||||||
|
outRecord(this.contractNumber).then(response => {
|
||||||
|
this.tableDataOut = response.data
|
||||||
|
this.listLoading1 = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error('零件出库失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user