This commit is contained in:
liushuai
2020-04-17 18:07:27 +08:00
parent 199f7fbbec
commit 1f2325301a
10 changed files with 500 additions and 39 deletions

View File

@@ -96,7 +96,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-right" @click="yesApproval(scope.row)">退货</el-button>
<el-button :disabled="Number(scope.row.退料数量) >= Number(scope.row.出库数量)" type="text" size="mini" icon="el-icon-right" @click="yesApproval(scope.row)">退货</el-button>
</template>
</el-table-column>
</el-table>
@@ -114,6 +114,20 @@
</el-card>
<el-dialog :visible.sync="dialogFormVisible" title="补投" center width="300px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="80px" class="demo-ruleForm">
<div>
<ei-row>
<span>{{ nameOrNumber }}</span>
</ei-row>
<el-row>
<span>出库数量:{{ outNumber }}</span>
</el-row>
<el-row>
<span>领料人:{{ people }}</span>
</el-row>
<el-row>
<span>出库时间:{{ time }}</span>
</el-row>
</div>
<el-form-item label="退料数量" prop="退料数量">
<el-input-number v-model="form.退料数量" :min="1" :max="outNumber" :step="1" style="width: 140px" size="small" />
</el-form-item>
@@ -164,6 +178,10 @@ export default {
model: '',
typeNumber: '',
floatNumber: '',
time: '',
nameOrNumber: '',
people: '',
number: '',
locateName: [],
tableData: [],
pageSize1: 100,
@@ -246,19 +264,28 @@ export default {
this.materialNumber = row.物料流水号
this.basicNumber = row.组件零件基本件流水号
this.outNumber = Number(row.出库数量)
this.nameOrNumber = row.名称 + ' ' + row.图号或型号
this.typeNumber = row.退料类型
this.floatNumber = row.零件流水号
this.time = row.出库时间 ? row.出库时间.split(' ')[0] : ''
this.people = row.领料人
},
submit() {
submitMaterialReturn(this.materialNumber, this.basicNumber, this.form.退料数量, this.form.货位名称, this.id, this.typeNumber, this.floatNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('退料成功')
this.dialogFormVisible = false
this.searchRecord()
this.handleEdit_disable = false
this.$refs['form'].validate((valid) => {
if (valid) {
submitMaterialReturn(this.materialNumber, this.basicNumber, this.form.退料数量, this.form.货位名称, this.id, this.typeNumber, this.floatNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('退料成功')
this.dialogFormVisible = false
this.searchRecord()
this.handleEdit_disable = false
} else {
this.handleEdit_disable = false
this.$message.error('退料失败')
}
})
} else {
this.handleEdit_disable = false
this.$message.error('退料失败')
return false
}
})
},