This commit is contained in:
lixin
2018-11-23 13:23:25 +08:00
parent 5692d65e57
commit fc6495403a
10 changed files with 168 additions and 94 deletions

View File

@@ -84,7 +84,7 @@
</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>
<el-button :disabled="scope.row.是否出库" 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>
@@ -93,7 +93,7 @@
</template>
<script>
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart } from '@/api/Inventory/PartOut'
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart, ListDetailOut } from '@/api/Inventory/PartOut'
import { mapGetters } from 'vuex'
export default {
data() {
@@ -113,6 +113,7 @@ export default {
tableDataPicking: [], // 领料单明细表格
listNumber: '',
pickingListNumber: null, // 领料单编号
pickingListNumber_check: 1,
pickingListNumberx: '', // 领料单流水号
picikingPeople: '', // 领料人流水号
partProjectNumber: '', // 项目流水号
@@ -144,8 +145,14 @@ export default {
},
// 查询领料单
searchListinfor() {
if (this.pickingListNumber === null) {
this.pickingListNumber_check = 0
}
this.listLoading = true
searchList(this.pickingListNumber).then(response => {
searchList(this.pickingListNumber_check, this.pickingListNumber).then(response => {
for (let i = 0; i < response.data.length; i++) {
response.data[i].领料时间 = response.data[i].领料时间.substring(0, response.data[i].领料时间.length - 8)
}
this.tableData1 = response.data
this.listLoading = false
})
@@ -154,7 +161,11 @@ export default {
searchListDetailt() {
this.listLoading1 = true
searchListDetail(this.pickingListNumberx).then(response => {
this.tableDataPicking = response.data
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].是否出库 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}
this.tableDataPicking = data
this.listLoading1 = false
})
},
@@ -171,12 +182,14 @@ export default {
if (row.车间外购 === 1) {
WorkShopPart(row.采购合同明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => {
if (response.data[0].result === '1') {
ListDetailOut(row.领料单明细流水号)
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') {
ListDetailOut(row.领料单明细流水号)
this.$message.success('出库成功')
} else { this.$message.error('出库失败') }
})
@@ -184,9 +197,11 @@ export default {
BasicPart(row.工艺计划流水号, row.出库数量, row.收件信息ID, row.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
ListDetailOut(row.领料单明细流水号)
} else { this.$message.error('增加失败') }
})
}
this.searchListDetailt()
}
}
}