This commit is contained in:
chenjianan
2019-03-23 18:00:39 +08:00
parent 2ccc8201d7
commit 275284f157
3 changed files with 105 additions and 36 deletions

View File

@@ -45,7 +45,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope" align="center">
<el-button size="mini" type="success" icon="el-icon-search" @click="searchoutRecord(scope.row)">查看领用情况</el-button>
<el-button size="mini" type="success" icon="el-icon-search" @click="pageCurrent2=1;pageSize2=10;total2=0;searchoutRecord(scope.row)">查看领用情况</el-button>
<el-button :disabled="Number(scope.row.货位存量)===0" size="mini" type="primary" icon="el-icon-sort-up" @click="parOut(scope.row)">出库</el-button>
</template>
</el-table-column>
@@ -81,7 +81,7 @@
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="出库数量" align="center" min-width="80">
<el-table-column label="出库数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
</template>
@@ -106,12 +106,28 @@
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="80">
<el-table-column label="出库人" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.出库人姓名 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="140">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
<!--零件出库对话框-->
<el-dialog :visible.sync="dialogFormVisible" title="零件出库" center width="380px">
@@ -192,7 +208,6 @@ export default {
MachineValue: [{ required: true, message: '请选择机床', trigger: 'blur' }],
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }]
},
contractNumber: '',
locateNumber: '',
materialNumber: '',
PeopleNumber: '',
@@ -203,6 +218,9 @@ export default {
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
pageCurrent2: 1,
pageSize2: 10,
total2: 0,
materialName: '', // 物料名称
materialSpec: '', // 物料规格
materialModel: '' // 物料型号
@@ -279,10 +297,31 @@ export default {
},
// 离线记录查询
searchoutRecord(row) {
this.contractNumber = row.离线合同明细流水号
// 物料流水号查
this.materialNumber = row.物料流水号
this.listLoading1 = true
outRecord(this.contractNumber).then(response => {
this.tableDataOut = response.data
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
},
handleSizeChange2(val) {
this.pageSize2 = val
this.pageCurrent2 = 1
this.listLoading1 = true
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.listLoading1 = true
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
},
@@ -295,7 +334,6 @@ export default {
this.form.MachineValue = ''
this.form.GroupNumValue = ''
this.dialogFormVisible = true
this.contractNumber = row.离线合同明细流水号
this.locateNumber = row.货位流水号
this.materialNumber = row.物料流水号
this.partnumber = row.货位存量
@@ -319,18 +357,21 @@ export default {
},
// 离线外购件出库
addDirectPartm() {
if (this.partnumber < this.form.DirectNumber) {
console.log(this.partnumber, this.form.DirectNumber)
if (Number(this.partnumber) < Number(this.form.DirectNumber)) {
this.$message.error('请正确输入数量')
} else {
this.$refs['form'].validate((valid) => {
if (valid) {
outlinePartOut(this.contractNumber, this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
outlinePartOut(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('零件出库成功')
this.dialogFormVisible = false
this.searchTable1()
outRecord(this.contractNumber).then(response => {
this.tableDataOut = response.data
// 物料流水号查
outRecord(this.materialNumber, this.pageCurrent2, this.pageSize2).then(response => {
this.tableDataOut = response.data.rows
this.total2 = response.data.total
this.listLoading1 = false
})
} else {