diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue
index dfb4c72..82d1124 100644
--- a/src/views/modules/qc/IPQCResultEntry.vue
+++ b/src/views/modules/qc/IPQCResultEntry.vue
@@ -1566,16 +1566,28 @@
handler: function (newV, oldV) {
this.detailData.notPassQty = this.detailData.samplingQty - this.detailData.passQty
if (this.detailData.inspectionResult === '不合格') {
- if (this.detailData.disposalMeasures === '让步接收' || this.detailData.disposalMeasures === '') {
+ if (this.detailData.disposalMeasures === '让步接收') {
this.detailData.batchQualifiedQty = this.detailData.rollQty
+ } else if (this.detailData.disposalMeasures === '返工返修' || this.detailData.disposalMeasures === '拒收退回') {
+ this.detailData.batchQualifiedQty = 0
} else if (this.detailData.disposalMeasures === '挑选使用') {
this.detailData.batchQualifiedQty = this.detailData.rollQty - this.detailData.notPassQty
- } else {
- this.detailData.batchQualifiedQty = 0
}
- } else {
+ } else if (this.detailData.inspectionResult === '合格'){
this.detailData.batchQualifiedQty = this.detailData.rollQty
}
+ // 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
+ // } else if (this.detailData.disposalMeasures === '挑选使用') {
+ // this.detailData.batchQualifiedQty = this.detailData.rollQty - this.detailData.notPassQty
+ // } else {
+ // this.detailData.batchQualifiedQty = 0
+ // }
+ // } else {
+ // this.detailData.batchQualifiedQty = this.detailData.rollQty
+ // }
}
},
detailList: {
diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue
index e7c0129..af86da9 100644
--- a/src/views/modules/qc/IQCResultEntry.vue
+++ b/src/views/modules/qc/IQCResultEntry.vue
@@ -428,7 +428,7 @@
-
+
@@ -441,7 +441,7 @@
-
+
@@ -1220,6 +1220,11 @@
this.detailData.unqualifiedQty = num2
}
},
+ 'detailData.rollCount' () {
+ this.$nextTick(() => {
+ this.enforcePassQtyNotExceedRollCount()
+ })
+ }
},
data () {
return {
@@ -2445,6 +2450,37 @@
}
qcPrint(this.IQCSelections)
},
+ rollCountChange () {
+ const rollQty = Number(this.detailData.rollQty)
+ const rollCount = this.detailData.rollCount
+ if (rollCount != null) {
+ const rc = Number(rollCount)
+ if (!isNaN(rollQty) && !isNaN(rc) && rc > rollQty) {
+ this.$set(this.detailData, 'rollCount', 0)
+ this.$message.warning('送检数量不能大于到货数量!')
+ }
+ }
+ this.$nextTick(() => {
+ this.enforcePassQtyNotExceedRollCount()
+ })
+ },
+ passQtyChange () {
+ this.enforcePassQtyNotExceedRollCount()
+ },
+ enforcePassQtyNotExceedRollCount () {
+ if (this.detailData.submitFlag === 'Y') return
+ const passQty = this.detailData.passQty
+ if (passQty == null) return
+ const rollCount = this.detailData.rollCount
+ const rc = Number(rollCount)
+ const pq = Number(passQty)
+ if (isNaN(pq)) return
+ if (isNaN(rc)) return
+ if (pq > rc) {
+ this.$set(this.detailData, 'passQty', 0)
+ this.$message.warning('合格数量不能大于送检数量!')
+ }
+ },
noBatchQualifiedQtyChange(){
if (this.detailData.noBatchQualifiedQty > this.detailData.rollQty) {
// 恢复原值