diff --git a/src/views/modules/qc/FAIResultEntry.vue b/src/views/modules/qc/FAIResultEntry.vue
index 2b89e3b..7b76e06 100644
--- a/src/views/modules/qc/FAIResultEntry.vue
+++ b/src/views/modules/qc/FAIResultEntry.vue
@@ -309,14 +309,16 @@
style="width: 85px">
-
-
+
+
-
+
samplingQty) {
+ this.$message.warning('合格数量不能大于抽样数量!')
+ this.$nextTick(() => {
+ this.$set(this.detailData, 'passQty', samplingQty)
+ this.syncPassNotPassQtyFromPass()
+ })
+ return
+ }
+ this.syncPassNotPassQtyFromPass()
+ },
+ noNotPassQtyChange () {
+ const notPassQty = Number(this.detailData.notPassQty)
+ const samplingQty = Number(this.detailData.samplingQty)
+ if (Number.isNaN(notPassQty) || Number.isNaN(samplingQty)) {
+ return
+ }
+ if (notPassQty > samplingQty) {
+ this.$message.warning('不合格数量不能大于抽样数量!')
+ this.$nextTick(() => {
+ this.$set(this.detailData, 'notPassQty', samplingQty)
+ this.syncPassNotPassQtyFromNotPass()
+ })
+ return
}
+ this.syncPassNotPassQtyFromNotPass()
},
// 校验用户是否收藏
diff --git a/src/views/modules/qc/FQCResultEntry.vue b/src/views/modules/qc/FQCResultEntry.vue
index a63d8f2..84015dd 100644
--- a/src/views/modules/qc/FQCResultEntry.vue
+++ b/src/views/modules/qc/FQCResultEntry.vue
@@ -293,14 +293,16 @@
style="width: 85px">
-
-
+
+
-
+
samplingQty) {
+ this.$message.warning('合格数量不能大于抽样数量!')
+ this.$nextTick(() => {
+ this.$set(this.detailData, 'passQty', samplingQty)
+ this.syncPassNotPassQtyFromPass()
+ })
+ return
+ }
+ this.syncPassNotPassQtyFromPass()
+ },
+ noNotPassQtyChange () {
+ const notPassQty = Number(this.detailData.notPassQty)
+ const samplingQty = Number(this.detailData.samplingQty)
+ if (Number.isNaN(notPassQty) || Number.isNaN(samplingQty)) {
+ return
+ }
+ if (notPassQty > samplingQty) {
+ this.$message.warning('不合格数量不能大于抽样数量!')
+ this.$nextTick(() => {
+ this.$set(this.detailData, 'notPassQty', samplingQty)
+ this.syncPassNotPassQtyFromNotPass()
+ })
+ return
}
+ this.syncPassNotPassQtyFromNotPass()
},
// 校验用户是否收藏
diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue
index 2535d19..03d0de2 100644
--- a/src/views/modules/qc/IPQCResultEntry.vue
+++ b/src/views/modules/qc/IPQCResultEntry.vue
@@ -343,11 +343,12 @@
-
-
+
+
-
+
+
@@ -976,7 +977,6 @@
detailData: {
deep: true,
handler: function (newV, oldV) {
- this.detailData.notPassQty = this.detailData.samplingQty - this.detailData.passQty
if (this.detailData.inspectionResult === '不合格') {
if (this.detailData.disposalMeasures === '让步接收' || this.detailData.disposalMeasures === '') {
this.detailData.batchQualifiedQty = this.detailData.rollQty
@@ -2611,6 +2611,12 @@
duration: 1500
})
}
+ }else if(data.code === 0 && data.rows.length == 0){
+ this.$message({
+ message: '数据采集成功,未采集到数据',
+ type: 'success',
+ duration: 1500
+ })
} else {
this.$message({
message: data.msg||'未采集到数据',
@@ -4097,7 +4103,59 @@
resultChange () {
if (this.detailData.inspectionResult === '不合格') {
this.detailData.passQty = 0
+ this.syncPassNotPassQtyFromPass()
+ } else if (this.detailData.inspectionResult === '合格') {
+ this.$set(this.detailData, 'notPassQty', 0)
+ this.syncPassNotPassQtyFromNotPass()
+ }
+ },
+ syncPassNotPassQtyFromPass () {
+ const samplingQty = Number(this.detailData.samplingQty)
+ const passQty = Number(this.detailData.passQty)
+ if (Number.isNaN(samplingQty) || Number.isNaN(passQty)) {
+ return
+ }
+ this.$set(this.detailData, 'notPassQty', samplingQty - passQty)
+ },
+ syncPassNotPassQtyFromNotPass () {
+ const samplingQty = Number(this.detailData.samplingQty)
+ const notPassQty = Number(this.detailData.notPassQty)
+ if (Number.isNaN(samplingQty) || Number.isNaN(notPassQty)) {
+ return
+ }
+ this.$set(this.detailData, 'passQty', samplingQty - notPassQty)
+ },
+ noPassQtyChange () {
+ const passQty = Number(this.detailData.passQty)
+ const samplingQty = Number(this.detailData.samplingQty)
+ if (Number.isNaN(passQty) || Number.isNaN(samplingQty)) {
+ return
+ }
+ if (passQty > samplingQty) {
+ this.$message.warning('合格数量不能大于抽样数量!')
+ this.$nextTick(() => {
+ this.$set(this.detailData, 'passQty', samplingQty)
+ this.syncPassNotPassQtyFromPass()
+ })
+ return
+ }
+ this.syncPassNotPassQtyFromPass()
+ },
+ noNotPassQtyChange () {
+ const notPassQty = Number(this.detailData.notPassQty)
+ const samplingQty = Number(this.detailData.samplingQty)
+ if (Number.isNaN(notPassQty) || Number.isNaN(samplingQty)) {
+ return
+ }
+ if (notPassQty > samplingQty) {
+ this.$message.warning('不合格数量不能大于抽样数量!')
+ this.$nextTick(() => {
+ this.$set(this.detailData, 'notPassQty', samplingQty)
+ this.syncPassNotPassQtyFromNotPass()
+ })
+ return
}
+ this.syncPassNotPassQtyFromNotPass()
},
// 校验用户是否收藏
diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue
index ec36d94..09f0909 100644
--- a/src/views/modules/qc/IQCResultEntry.vue
+++ b/src/views/modules/qc/IQCResultEntry.vue
@@ -240,7 +240,8 @@
-
+
+
@@ -845,7 +846,6 @@
this.$set(this.detailData, 'passQty', samplingQty)
return
}
- this.detailData.notPassQty = this.detailData.samplingQty - this.detailData.passQty
if (this.detailData.inspectionResult === '不合格') {
if (this.detailData.disposalMeasures === '让步接收') {
this.detailData.batchQualifiedQty = this.detailData.rollQty
@@ -3313,6 +3313,10 @@
resultChange () {
if (this.detailData.inspectionResult === '不合格') {
this.detailData.passQty = 0
+ this.syncPassNotPassQtyFromPass()
+ } else if (this.detailData.inspectionResult === '合格') {
+ this.$set(this.detailData, 'notPassQty', 0)
+ this.syncPassNotPassQtyFromNotPass()
}
},
@@ -3502,6 +3506,22 @@
}
this.noPassQtyChange()
},
+ syncPassNotPassQtyFromPass () {
+ const samplingQty = Number(this.detailData.samplingQty)
+ const passQty = Number(this.detailData.passQty)
+ if (Number.isNaN(samplingQty) || Number.isNaN(passQty)) {
+ return
+ }
+ this.$set(this.detailData, 'notPassQty', samplingQty - passQty)
+ },
+ syncPassNotPassQtyFromNotPass () {
+ const samplingQty = Number(this.detailData.samplingQty)
+ const notPassQty = Number(this.detailData.notPassQty)
+ if (Number.isNaN(samplingQty) || Number.isNaN(notPassQty)) {
+ return
+ }
+ this.$set(this.detailData, 'passQty', samplingQty - notPassQty)
+ },
noPassQtyChange(){
const passQty = Number(this.detailData.passQty)
const samplingQty = Number(this.detailData.samplingQty)
@@ -3509,12 +3529,30 @@
return
}
if (passQty > samplingQty) {
- this.$message.warning('合格数量不能大于送检数量!')
- // 延后一帧回写,避免被 input-number 本次输入流程覆盖
+ this.$message.warning('合格数量不能大于抽样数量!')
this.$nextTick(() => {
this.$set(this.detailData, 'passQty', samplingQty)
+ this.syncPassNotPassQtyFromPass()
})
+ return
+ }
+ this.syncPassNotPassQtyFromPass()
+ },
+ noNotPassQtyChange () {
+ const notPassQty = Number(this.detailData.notPassQty)
+ const samplingQty = Number(this.detailData.samplingQty)
+ if (Number.isNaN(notPassQty) || Number.isNaN(samplingQty)) {
+ return
+ }
+ if (notPassQty > samplingQty) {
+ this.$message.warning('不合格数量不能大于抽样数量!')
+ this.$nextTick(() => {
+ this.$set(this.detailData, 'notPassQty', samplingQty)
+ this.syncPassNotPassQtyFromNotPass()
+ })
+ return
}
+ this.syncPassNotPassQtyFromNotPass()
},
noBatchQualifiedQtyChange(){
if (this.detailData.noBatchQualifiedQty > this.detailData.rollQty) {
diff --git a/src/views/modules/qc/PQCResultEntry.vue b/src/views/modules/qc/PQCResultEntry.vue
index 0dda441..783aaab 100644
--- a/src/views/modules/qc/PQCResultEntry.vue
+++ b/src/views/modules/qc/PQCResultEntry.vue
@@ -453,27 +453,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
预览SOP
@@ -492,7 +493,7 @@
-
+
@@ -1130,7 +1131,6 @@ export default {
detailData: {
deep: true,
handler: function (newV, oldV) {
- this.detailData.notPassQty = this.detailData.samplingQty - this.detailData.passQty
if (this.detailData.inspectionResult === '不合格') {
if (this.detailData.disposalMeasures === '让步接收' || this.detailData.disposalMeasures === '') {
this.detailData.batchQualifiedQty = this.detailData.rollQty
@@ -4396,7 +4396,59 @@ export default {
resultChange () {
if (this.detailData.inspectionResult === '不合格') {
this.detailData.passQty = 0
+ this.syncPassNotPassQtyFromPass()
+ } else if (this.detailData.inspectionResult === '合格') {
+ this.$set(this.detailData, 'notPassQty', 0)
+ this.syncPassNotPassQtyFromNotPass()
+ }
+ },
+ syncPassNotPassQtyFromPass () {
+ const samplingQty = Number(this.detailData.samplingQty)
+ const passQty = Number(this.detailData.passQty)
+ if (Number.isNaN(samplingQty) || Number.isNaN(passQty)) {
+ return
+ }
+ this.$set(this.detailData, 'notPassQty', samplingQty - passQty)
+ },
+ syncPassNotPassQtyFromNotPass () {
+ const samplingQty = Number(this.detailData.samplingQty)
+ const notPassQty = Number(this.detailData.notPassQty)
+ if (Number.isNaN(samplingQty) || Number.isNaN(notPassQty)) {
+ return
+ }
+ this.$set(this.detailData, 'passQty', samplingQty - notPassQty)
+ },
+ noPassQtyChange () {
+ const passQty = Number(this.detailData.passQty)
+ const samplingQty = Number(this.detailData.samplingQty)
+ if (Number.isNaN(passQty) || Number.isNaN(samplingQty)) {
+ return
+ }
+ if (passQty > samplingQty) {
+ this.$message.warning('合格数量不能大于抽样数量!')
+ this.$nextTick(() => {
+ this.$set(this.detailData, 'passQty', samplingQty)
+ this.syncPassNotPassQtyFromPass()
+ })
+ return
+ }
+ this.syncPassNotPassQtyFromPass()
+ },
+ noNotPassQtyChange () {
+ const notPassQty = Number(this.detailData.notPassQty)
+ const samplingQty = Number(this.detailData.samplingQty)
+ if (Number.isNaN(notPassQty) || Number.isNaN(samplingQty)) {
+ return
+ }
+ if (notPassQty > samplingQty) {
+ this.$message.warning('不合格数量不能大于抽样数量!')
+ this.$nextTick(() => {
+ this.$set(this.detailData, 'notPassQty', samplingQty)
+ this.syncPassNotPassQtyFromNotPass()
+ })
+ return
}
+ this.syncPassNotPassQtyFromNotPass()
},
// 校验用户是否收藏