From 144b5f9c8a9201779114853e7ecd3a375f74ac7b Mon Sep 17 00:00:00 2001
From: zhangdingyu <974548713@qq.com>
Date: Sun, 30 Dec 2018 11:33:42 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E5=8D=8F=E4=B8=8D=E5=90=88=E6=A0=BC?=
=?UTF-8?q?=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../MaterialArrivalManagement/index.vue | 2 +-
.../UnqualifiedTreatment/index.vue | 32 +++++++++++--------
2 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/src/views/ManufacturingCenter/MaterialArrivalManagement/index.vue b/src/views/ManufacturingCenter/MaterialArrivalManagement/index.vue
index 2a147c6f..b8fce6f0 100644
--- a/src/views/ManufacturingCenter/MaterialArrivalManagement/index.vue
+++ b/src/views/ManufacturingCenter/MaterialArrivalManagement/index.vue
@@ -7,7 +7,7 @@
查询
查询全部
到货
- 刷新
+
diff --git a/src/views/Outsourcing/UnqualifiedTreatment/index.vue b/src/views/Outsourcing/UnqualifiedTreatment/index.vue
index 68f6b92e..545948fc 100644
--- a/src/views/Outsourcing/UnqualifiedTreatment/index.vue
+++ b/src/views/Outsourcing/UnqualifiedTreatment/index.vue
@@ -138,6 +138,7 @@ import { initOutHelp, searchTable, editList } from '@/api/Outsourcing/Unqualifie
export default {
data() {
return {
+ num_bhg: '',
count2: 0,
form: {
wasteQuantity: '', // 废品数量
@@ -219,24 +220,29 @@ export default {
}
this.number = row.外协加工任务单明细流水号
this.form.wasteQuantity = row.废品数量
+ this.num_bhg = row.批次数量
this.form.processingMethod = row.不合格处理方式
this.dialogFormVisible1 = true
},
// 提交编辑
submitEdit() {
- editList(this.number, this.form.wasteQuantity, this.form.processingMethod).then(response => {
- if (response.data[0].result === '1') {
- this.dialogFormVisible1 = false
- this.$message({
- type: 'success',
- message: '信息更新成功!'
- })
- this.searchTable()
- } else {
- this.dialogFormVisible1 = false
- this.$message.error('信息更新失败')
- }
- })
+ if (this.form.wasteQuantity > this.num_bhg) {
+ this.$message.error('废品数量大于总数量')
+ } else {
+ editList(this.number, this.form.wasteQuantity, this.form.processingMethod).then(response => {
+ if (response.data[0].result === '1') {
+ this.dialogFormVisible1 = false
+ this.$message({
+ type: 'success',
+ message: '信息更新成功!'
+ })
+ this.searchTable()
+ } else {
+ this.dialogFormVisible1 = false
+ this.$message.error('信息更新失败')
+ }
+ })
+ }
},
// 提交添加或者修改
submit(formName) {