lx inventory inboundscanning

This commit is contained in:
lixin
2018-12-05 19:55:15 +08:00
parent fa3c525088
commit 1d2b9c52a9
4 changed files with 72 additions and 22 deletions

View File

@@ -4,8 +4,8 @@
<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-input v-model="Partpaint" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getCraftNumber()">查询</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>
@@ -91,7 +91,7 @@
</template>
<script>
import { searchTable, insertOne, getinventory, getlocate } from '@/api/Inventory/Inboundscanning'
import { searchTable, insertOne, getinventory, getlocate, searchPartNumber, CraftNumber } from '@/api/Inventory/Inboundscanning'
import { mapGetters } from 'vuex'
import { wsuri, name } from '@/utils/request'
import print from '@/vendor/print'
@@ -109,7 +109,8 @@ export default {
inventoryName: [], // 仓库名称下拉框
inventoryNumber: '',
locateName: [], // 货位名称下拉框
locateNumber: ''
locateNumber: '',
Partpaint: ''
}
},
computed: {
@@ -162,8 +163,7 @@ export default {
websocketonmessage(msg) { // 数据接收
this.partNumber = msg.data.split('|')[3]
this.partNumber = this.partNumber.slice(1)
console.log()
this.getscantable(this.partNumber, 3333)
this.getPaint(this.partNumber)
},
websocketclose() { // 关闭
console.log('WebSocket关闭')
@@ -171,6 +171,19 @@ export default {
websocketerror() { // 失败
console.log('WebSocket连接失败')
},
getCraftNumber() {
CraftNumber(this.Partpaint).then(response => {
this.partNumber = response.data[0].工艺计划流水号
})
console.log(this.partNumber, 1111)
this.getscantable()
},
getPaint() {
searchPartNumber(this.partNumber).then(response => {
this.Partpaint = response.data[0].零件图号
})
this.getscantable()
},
// 扫描查询
getscantable() {
if (this.partNumber === '') {
@@ -248,6 +261,7 @@ export default {
// 清空
Empty() {
this.tableData = []
this.Partpaint = ''
},
// 仓库查询
Getinvent() {

View File

@@ -103,8 +103,8 @@
</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>
<el-button :disabled="scope.row.是否出库" size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 10px 10px" @click="editListDetailx(scope.row)">编辑</el-button>
<el-button :disabled="scope.row.是否出库" 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>
@@ -558,7 +558,8 @@ export default {
time: [],
materialLocate: '',
enableOut: '',
pickingListNumber_check: 1
pickingListNumber_check: 1,
outNumber: ''
}
},
computed: {
@@ -700,8 +701,11 @@ export default {
searchListDetailt() {
this.listLoading3 = true
searchListDetail(this.pickingListNumberx).then(response => {
console.log(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.listLoading3 = false
})
},
@@ -807,6 +811,7 @@ export default {
})
this.dialogFormVisible1 = false
this.searchListinfor()
this.searchListDetailt()
}
})
}
@@ -854,6 +859,7 @@ export default {
})
this.dialogFormVisible = false
this.searchListinfor()
this.searchListDetailt()
}
},
// 增加车间采购领料单明细
@@ -898,22 +904,30 @@ export default {
})
this.dialogFormVisibleWork = false
this.searchListinfor()
this.searchListDetailt()
},
// 修改领料单明细
editListDetailx(row) {
this.dialogFormVisible2 = true
this.pickingListDetail = row.领料单明细流水号
this.form4.OutNumber = row.出库数量
this.outNumber = row.出库数量
this.form4.outNote = row.备注
},
submitChannge() {
editListDetail(this.pickingListDetail, this.form4.OutNumber, this.form4.outNote).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
} else {
this.$message.error('修改失败')
}
})
this.dialogFormVisible2 = false
this.searchListDetailt()
if (this.form4.OutNumber > this.outNumber) {
this.$message.error('修改数量须小于领用数量')
} else {
editListDetail(this.pickingListDetail, this.form4.OutNumber, this.form4.outNote).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
} else {
this.$message.error('修改失败')
}
})
this.dialogFormVisible2 = false
this.searchListDetailt()
}
},
// 重置表单
callOff() {