|
|
|
@ -48,7 +48,7 @@ |
|
|
|
<template #footer> |
|
|
|
<template #footer> |
|
|
|
<span class="dialog-footer"> |
|
|
|
<span class="dialog-footer"> |
|
|
|
<el-button @click="closeDialog">取 消</el-button> |
|
|
|
<el-button @click="closeDialog">取 消</el-button> |
|
|
|
<el-button type="primary" @click="submit()">确 认</el-button> |
|
|
|
<el-button type="primary" @click="submit()" :loading="saveLoading">确 认</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
@ -69,6 +69,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
saveLoading: false, |
|
|
|
isOpen: false, |
|
|
|
isOpen: false, |
|
|
|
batchesForm: {}, |
|
|
|
batchesForm: {}, |
|
|
|
batchesRules: { |
|
|
|
batchesRules: { |
|
|
|
@ -87,6 +88,7 @@ export default { |
|
|
|
submit() { |
|
|
|
submit() { |
|
|
|
this.$refs.batchesForm.validate(valid => { |
|
|
|
this.$refs.batchesForm.validate(valid => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
|
|
|
|
this.saveLoading = true; |
|
|
|
let query = { |
|
|
|
let query = { |
|
|
|
id: this.itemData[0].woId, |
|
|
|
id: this.itemData[0].woId, |
|
|
|
batchNo: this.itemData[0].batchNo, |
|
|
|
batchNo: this.itemData[0].batchNo, |
|
|
|
@ -95,13 +97,17 @@ export default { |
|
|
|
makeQty: this.batchesForm.makeQty, |
|
|
|
makeQty: this.batchesForm.makeQty, |
|
|
|
batchReason: this.batchesForm.batchReason, |
|
|
|
batchReason: this.batchesForm.batchReason, |
|
|
|
}; |
|
|
|
}; |
|
|
|
inBatches(query).then((res) => { |
|
|
|
inBatches(query) |
|
|
|
if (res.code == 200) { |
|
|
|
.then(res => { |
|
|
|
this.$message.success('操作成功'); |
|
|
|
this.$message.success('操作成功'); |
|
|
|
|
|
|
|
this.saveLoading = false; |
|
|
|
this.closeDialog(); |
|
|
|
this.closeDialog(); |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
.catch(err => { |
|
|
|
|
|
|
|
this.saveLoading = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
this.saveLoading = false; |
|
|
|
console.log('error submit!!'); |
|
|
|
console.log('error submit!!'); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|