更新
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
<div style="width: 62%;float: left">
|
||||
<el-card>
|
||||
<el-table :data="pickListTable2" :row-class-name="tableRowClassName1" highlight-current-row border style="width: 1000px" size="mini" height="600" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||
<el-table-column label="名称" show-overflow-tooltip prop="名称" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
@@ -73,17 +74,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="领用" align="center" width="50">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总数量 }}
|
||||
{{ 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.备件数量 }}
|
||||
<el-input-number :disabled="Number(scope.row.领用数量) <= Number(scope.row.出库数量1) || Number(scope.row.货位存量1) === 0" :max="scope.row.货位存量1" :min="1" v-model="scope.row.出库数量" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存" align="center" width="50">
|
||||
@@ -287,6 +283,7 @@ export default {
|
||||
multipleSelection1: [],
|
||||
multipleSelection: [],
|
||||
pickingListNum: '', // 领料单流水号
|
||||
pickingListNumGroup: [], // 领料单流水号
|
||||
pickingPersonNum: '', // 领料人流水号
|
||||
pickingListNumber: '',
|
||||
pickingListNumberShow: '',
|
||||
@@ -526,7 +523,7 @@ export default {
|
||||
this.dialogFormVisible3 = true
|
||||
},
|
||||
selectable(row, index) { // 控制某行是否可选
|
||||
return ((Number(row.总数量) <= Number(row.出库数量1))) === false
|
||||
return ((Number(row.领用数量) <= Number(row.出库数量1))) === false
|
||||
},
|
||||
// 初始化数据
|
||||
fetchData() {
|
||||
@@ -598,20 +595,6 @@ export default {
|
||||
row && row.领料单编号 ? this.pickingListNumberShow = row.领料单编号 : this.pickingListNumberShow
|
||||
row && row.姓名 ? this.form3.personName = row.姓名 : this.form3.personName
|
||||
searchListDetail(this.pickingListNum).then(res => {
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
if (res.data[i].离线采购件流水号 !== 0) {
|
||||
res.data[i].货位存量1 = res.data[i].货位存量
|
||||
}
|
||||
if (res.data[i].请购单明细流水号 !== 0 && res.data[i].请购单明细流水号 !== '' && res.data[i].请购单明细流水号 !== null) {
|
||||
res.data[i].货位存量1 = res.data[i].货位存量
|
||||
}
|
||||
if (res.data[i].货位存量1 > res.data[i].总数量) {
|
||||
res.data[i].出库数量 = res.data[i].总数量
|
||||
}
|
||||
if (res.data[i].出库数量1 >= res.data[i].总数量) {
|
||||
res.data[i].出库数量 = 0
|
||||
}
|
||||
}
|
||||
this.pickListTable2 = res.data
|
||||
})
|
||||
},
|
||||
@@ -633,10 +616,29 @@ export default {
|
||||
},
|
||||
// 多选
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection1 = []
|
||||
val.map(v => {
|
||||
this.multipleSelection1.push(v.领料单明细流水号)
|
||||
})
|
||||
this.StockNumberTable = val
|
||||
this.multipleSelection = []
|
||||
this.basePartNum = []
|
||||
this.materialNum = []
|
||||
this.parchasePartNum = []
|
||||
this.purchaseBillNum = []
|
||||
this.groupNumValue = []
|
||||
this.machineValue = []
|
||||
this.offlineNum = []
|
||||
this.outNumber = []
|
||||
this.pickingListNumGroup = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.multipleSelection.push(val[i].领料单明细流水号)
|
||||
this.basePartNum.push(val[i].基本件流水号)
|
||||
this.materialNum.push(val[i].物料流水号)
|
||||
this.parchasePartNum.push(val[i].标准件和外购件流水号)
|
||||
this.purchaseBillNum.push(val[i].请购单明细流水号)
|
||||
this.groupNumValue.push(val[i].组件流水号)
|
||||
this.machineValue.push(val[i].机床流水号)
|
||||
this.offlineNum.push(val[i].离线采购件流水号)
|
||||
this.outNumber.push(val[i].出库数量)
|
||||
this.pickingListNumGroup.push(val[i].领料单流水号)
|
||||
}
|
||||
},
|
||||
// 提交领料确认
|
||||
pickConfirm1() {
|
||||
@@ -650,18 +652,20 @@ export default {
|
||||
this.machineValue = []
|
||||
this.offlineNum = []
|
||||
this.outNumber = []
|
||||
for (let i = 0; i < this.pickListTable2.length; i++) {
|
||||
this.pickingListNumGroup = []
|
||||
for (let i = 0; i < this.StockNumberTable.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 (this.StockNumberTable[i].出库数量 !== 0) {
|
||||
this.multipleSelection.push(this.StockNumberTable[i].领料单明细流水号)
|
||||
this.basePartNum.push(this.StockNumberTable[i].基本件流水号)
|
||||
this.materialNum.push(this.StockNumberTable[i].物料流水号)
|
||||
this.parchasePartNum.push(this.StockNumberTable[i].标准件和外购件流水号)
|
||||
this.purchaseBillNum.push(this.StockNumberTable[i].请购单明细流水号)
|
||||
this.groupNumValue.push(this.StockNumberTable[i].组件流水号)
|
||||
this.machineValue.push(this.StockNumberTable[i].机床流水号)
|
||||
this.offlineNum.push(this.StockNumberTable[i].离线采购件流水号)
|
||||
this.outNumber.push(this.StockNumberTable[i].出库数量)
|
||||
this.pickingListNumGroup.push(this.StockNumberTable[i].领料单流水号)
|
||||
}
|
||||
}
|
||||
if (this.form3.DirectNote) {
|
||||
@@ -670,7 +674,7 @@ export default {
|
||||
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 => {
|
||||
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.pickingListNumGroup, this.offlineNum, this.department111).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('出库成功')
|
||||
this.dialogFormVisible3 = false
|
||||
|
||||
Reference in New Issue
Block a user