物料吹开
This commit is contained in:
@@ -232,7 +232,7 @@ export function selectleaders(department) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 领料单查询
|
// 领料单查询
|
||||||
export function searchList222(pageCurrent, pageSize, listPeople_check) {
|
export function searchList222(listPeople_check, listPeople, pageCurrent, pageSize) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -241,7 +241,7 @@ export function searchList222(pageCurrent, pageSize, listPeople_check) {
|
|||||||
ModularID: router.currentRoute.path,
|
ModularID: router.currentRoute.path,
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间装配管理_领料单明细_查询数据_新2',
|
name: '车间装配管理_领料单明细_查询数据_新2',
|
||||||
param: '图号=' + listPeople_check,
|
param: '图号_check=' + listPeople_check + '&图号=' + listPeople,
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -391,14 +391,13 @@ export default {
|
|||||||
switch (this.activeName) {
|
switch (this.activeName) {
|
||||||
case '0': {
|
case '0': {
|
||||||
this.pickListTable2 = []
|
this.pickListTable2 = []
|
||||||
this.fetchData()
|
|
||||||
this.searchList()
|
this.searchList()
|
||||||
this.getHouse()
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
// ANDON
|
// ANDON
|
||||||
case '1': {
|
case '1': {
|
||||||
this.$refs.fresh1.fetchData(1)
|
this.$refs.fresh1.searchList()
|
||||||
|
this.$refs.fresh1.fetchData()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,113 +1,207 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<div style="margin-top: 2px;margin-bottom: 2px">
|
||||||
<div style="margin-top: 2px;margin-bottom: 2px">
|
<el-input v-model="pickingListNumber" placeholder="图号或型号" clearable size="small" style="width:200px" />
|
||||||
<el-input v-model="pickingListNumber" placeholder="图号或型号" clearable size="small" style="width:200px" />
|
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 0 0 0 10px" plain @click="searchList()">查询</el-button>
|
||||||
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 0 0 0 10px" plain @click="searchList()">查询</el-button>
|
<el-button size="small" style="margin-left: 100px" type="distribution" @click="inputPassword()">领料确认</el-button>
|
||||||
<el-button size="small" style="margin-left: 100px" type="distribution" @click="inputPassword()">领料确认</el-button>
|
</div>
|
||||||
|
<el-table v-loading="loading1" :data="pickListTable2" :row-class-name="tableRowClassName1" highlight-current-row border style="width: 1000px" size="mini" height="600" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column label="名称" show-overflow-tooltip prop="名称" align="center" width="90">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图号或型号" prop="图号或型号" align="center" width="110" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.图号或型号 || '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="规格" prop="规格" align="center" width="110" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.规格 || '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="领用" align="center" width="50">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.总数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出库" align="center" width="130">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input-number :disabled="parseInt(scope.row.总数量) <= parseInt(scope.row.出库数量1) || parseInt(scope.row.货位存量1) === null" :max="parseInt(scope.row.货位存量1)" v-model="scope.row.出库数量" size="mini" style="width: 100%"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备件" align="center" width="50">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.备件数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="库存" align="center" width="50">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.货位存量1 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="已领" align="center" width="50">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.出库数量1 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="机床图号" prop="机床图号" align="center" width="80" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.机床图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="组号" align="center" width="50">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.组号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent1"
|
||||||
|
:page-sizes="[50, 100, 150, 200]"
|
||||||
|
: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-dialog v-el-drag-dialog :visible.sync="dialogFormVisible3" title="领料确认" center width="380px">
|
||||||
|
<el-form ref="form3" :model="form3" :rules="rules3" label-position="right">
|
||||||
|
<el-form-item label="出库类别" prop="outTypeValue" label-width="100px" size="small">
|
||||||
|
<el-select v-model="form3.outTypeValue" size="small" placeholder="出库类别" style="width: 200px;margin-right:10px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in outType"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="领料部门" label-width="100px" size="small">
|
||||||
|
<el-select v-model="form3.department" placeholder="请选择部门" size="small" clearable style="width: 200px;" @change="selectLeaders">
|
||||||
|
<el-option
|
||||||
|
v-for="item in departments"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="领料人" prop="领料人" label-width="100px" size="small">
|
||||||
|
<el-select v-model="form3.DirectNote" placeholder="请选择领料人" size="small" clearable style="width: 200px;" filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in DirectNotes"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="人员编号" prop="password" label-width="100px" size="small">
|
||||||
|
<el-input v-model="form3.password" size="small" placeholder="人员编号" style="width: 200px"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible3=false">取消</el-button>
|
||||||
|
<el-button :disabled="buttonDisable" type="primary" @click="pickConfirm1()">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="pickListTable2" :row-class-name="tableRowClassName1" highlight-current-row border style="width: 1000px" size="mini" height="600" @selection-change="handleSelectionChange">
|
</el-dialog>
|
||||||
<el-table-column label="名称" show-overflow-tooltip prop="名称" align="center" width="90">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.名称 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="图号或型号" prop="图号或型号" align="center" width="110" show-overflow-tooltip>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.图号或型号 || '—' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="规格" prop="规格" align="center" width="110" show-overflow-tooltip>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.规格 || '—' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="领用" align="center" width="50">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.总数量 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="出库" align="center" width="130">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input-number :disabled="Number(scope.row.总数量) <= Number(scope.row.出库数量1) || scope.row.货位存量1 === null" :max="scope.row.货位存量1" v-model="scope.row.出库数量" size="mini" style="width: 100%"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="备件" align="center" width="50">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.备件数量 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="库存" align="center" width="50">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.货位存量1 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="已领" align="center" width="50">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.出库数量1 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column v-if="true" label="备料" align="center" width="60">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-tag v-if="Number(scope.row.是否备料确认)===1" size="mini" type="success">已备</el-tag>-->
|
|
||||||
<!-- <el-tag v-else type="warning" size="mini">未备</el-tag>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column v-if="true" label="领料" align="center" width="60">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-tag v-if="(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini">已领</el-tag>-->
|
|
||||||
<!-- <el-tag v-else-if="Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini">未完</el-tag>-->
|
|
||||||
<!-- <el-tag v-else-if="Number(scope.row.出库数量1) === 0" type="warning" size="mini">未领</el-tag>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<el-table-column label="机床图号" prop="机床图号" align="center" width="80" show-overflow-tooltip>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.机床图号 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="组号" align="center" width="50">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.组号 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { searchList222 } from '@/api/Inventory/MaterialOut'
|
import { initPickPerson, initMachineProject, initOutType, searchList222, selectdepartment, submitOutStore, selectleaders } from '@/api/Inventory/MaterialOut'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pickingListNumber: '',
|
pickingListNumber: '',
|
||||||
pickListTable2: []
|
pickListTable2: [],
|
||||||
|
departments: [],
|
||||||
|
DirectNotes: [],
|
||||||
|
outType: [],
|
||||||
|
total1: 0,
|
||||||
|
pageCurrent1: 1,
|
||||||
|
pageSize1: 50,
|
||||||
|
loading1: false,
|
||||||
|
dialogFormVisible3: false,
|
||||||
|
buttonDisable: false,
|
||||||
|
form3: {
|
||||||
|
outTypeValue: '',
|
||||||
|
department: '',
|
||||||
|
password: '',
|
||||||
|
DirectNote: ''
|
||||||
|
},
|
||||||
|
rules3: {
|
||||||
|
password: [{ required: true, message: '请输入' }],
|
||||||
|
outTypeValue: [{ required: true, message: '请选择' }]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化数据
|
|
||||||
fetchData() {
|
fetchData() {
|
||||||
console.log(111111)
|
this.person = []
|
||||||
|
initPickPerson().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.person.push({
|
||||||
|
label: response.data[i].姓名,
|
||||||
|
value: response.data[i].人员编号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.machine = []
|
||||||
|
initMachineProject().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.machine.push({
|
||||||
|
label: response.data[i].机床图号,
|
||||||
|
name: response.data[i].项目名称,
|
||||||
|
value: response.data[i].机床流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
initOutType().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.outType.push({
|
||||||
|
label: response.data[i].出库类别名称,
|
||||||
|
value: response.data[i].出库类别流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectLeaders() {
|
||||||
|
this.DirectNotes = []
|
||||||
|
selectleaders(this.form3.department).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.DirectNotes.push({
|
||||||
|
label: response.data[i].姓名,
|
||||||
|
value: response.data[i].考勤编号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
searchList() {
|
searchList() {
|
||||||
searchList222(this.pickingListNum).then(res => {
|
this.loading1 = true
|
||||||
console.log(res.data)
|
var check
|
||||||
for (let i = 0; i < res.data.length; i++) {
|
this.pickingListNumber ? check = 1 : check = 0
|
||||||
if (res.data[i].离线采购件流水号 !== 0) {
|
searchList222(check, this.pickingListNumber, this.pageCurrent1, this.pageSize1).then(response => {
|
||||||
res.data[i].货位存量1 = res.data[i].货位存量
|
for (let i = 0; i < response.data.rows.length; i++) {
|
||||||
|
if (response.data.rows[i].离线采购件流水号 !== 0) {
|
||||||
|
response.data.rows[i].货位存量1 = response.data.rows[i].货位存量
|
||||||
}
|
}
|
||||||
if (res.data[i].请购单明细流水号 !== 0 && res.data[i].请购单明细流水号 !== '' && res.data[i].请购单明细流水号 !== null) {
|
if (response.data.rows[i].请购单明细流水号 !== 0 && response.data.rows[i].请购单明细流水号 !== '' && response.data.rows[i].请购单明细流水号 !== null) {
|
||||||
res.data[i].货位存量1 = res.data[i].货位存量
|
response.data.rows[i].货位存量1 = response.data.rows[i].货位存量
|
||||||
}
|
}
|
||||||
if (res.data[i].货位存量1 > res.data[i].总数量) {
|
if (response.data.rows[i].货位存量1 > response.data.rows[i].总数量) {
|
||||||
res.data[i].出库数量 = res.data[i].总数量
|
response.data.rows[i].出库数量 = response.data.rows[i].总数量
|
||||||
}
|
}
|
||||||
if (res.data[i].出库数量1 >= res.data[i].总数量) {
|
if (response.data.rows[i].出库数量1 >= response.data.rows[i].总数量) {
|
||||||
res.data[i].出库数量 = 0
|
response.data.rows[i].出库数量 = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.pickListTable2 = res.data
|
this.loading1 = false
|
||||||
|
this.total1 = response.data.total
|
||||||
|
this.pickListTable2 = response.data.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tableRowClassName1({ row }) {
|
tableRowClassName1({ row }) {
|
||||||
@@ -125,6 +219,81 @@ export default {
|
|||||||
val.map(v => {
|
val.map(v => {
|
||||||
this.multipleSelection1.push(v.领料单明细流水号)
|
this.multipleSelection1.push(v.领料单明细流水号)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 领料确认
|
||||||
|
inputPassword() {
|
||||||
|
this.form3.outTypeValue = 21
|
||||||
|
this.form3.password = ''
|
||||||
|
this.selectDepartment()
|
||||||
|
this.departments = []
|
||||||
|
this.buttonDisable = false
|
||||||
|
this.dialogFormVisible3 = true
|
||||||
|
},
|
||||||
|
selectDepartment() {
|
||||||
|
selectdepartment().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.departments.push({
|
||||||
|
label: response.data[i].部门名称,
|
||||||
|
value: response.data[i].考核部门编号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 提交领料确认
|
||||||
|
pickConfirm1() {
|
||||||
|
this.buttonDisable = true
|
||||||
|
this.multipleSelection = []
|
||||||
|
this.basePartNum = []
|
||||||
|
this.materialNum = []
|
||||||
|
this.parchasePartNum = []
|
||||||
|
this.purchaseBillNum = []
|
||||||
|
this.groupNumValue = []
|
||||||
|
this.machineValue = []
|
||||||
|
this.offlineNum = []
|
||||||
|
this.outNumber = []
|
||||||
|
for (let i = 0; i < this.pickListTable2.length; i++) {
|
||||||
|
console.log(this.pickListTable2[i].出库数量, 1233)
|
||||||
|
if (this.pickListTable2[i].出库数量 !== 0) {
|
||||||
|
this.multipleSelection.push(this.pickListTable2[i].领料单明细流水号)
|
||||||
|
this.basePartNum.push(this.pickListTable2[i].基本件流水号)
|
||||||
|
this.materialNum.push(this.pickListTable2[i].物料流水号)
|
||||||
|
this.parchasePartNum.push(this.pickListTable2[i].标准件和外购件流水号)
|
||||||
|
this.purchaseBillNum.push(this.pickListTable2[i].请购单明细流水号)
|
||||||
|
this.groupNumValue.push(this.pickListTable2[i].组件流水号)
|
||||||
|
this.machineValue.push(this.pickListTable2[i].机床流水号)
|
||||||
|
this.offlineNum.push(this.pickListTable2[i].离线采购件流水号)
|
||||||
|
this.outNumber.push(this.pickListTable2[i].出库数量)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Number(this.form3.password) === Number(this.form3.DirectNote)) {
|
||||||
|
for (let i = 0; i < this.departments.length; i++) {
|
||||||
|
if (this.form3.department === this.departments[i].value) {
|
||||||
|
this.department111 = this.departments[i].label
|
||||||
|
}
|
||||||
|
}
|
||||||
|
submitOutStore(this.multipleSelection, this.basePartNum, this.materialNum, this.parchasePartNum, this.purchaseBillNum, this.groupNumValue, this.machineValue, this.outNumber, this.id, this.form3.DirectNote, this.form3.outTypeValue, this.pickingListNum, this.offlineNum, this.department111).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('出库成功')
|
||||||
|
this.dialogFormVisible3 = false
|
||||||
|
this.searchList()
|
||||||
|
} else {
|
||||||
|
this.buttonDisable = false
|
||||||
|
this.$message.error('操作失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.buttonDisable = false
|
||||||
|
this.$message.error('人员编号错误')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSizeChange1(val) {
|
||||||
|
this.pageCurrent1 = 1
|
||||||
|
this.pageSize1 = val
|
||||||
|
this.searchList()
|
||||||
|
},
|
||||||
|
handleCurrentChange1(val) {
|
||||||
|
this.pageCurrent1 = val
|
||||||
|
this.searchList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user