Browse Source

2026-04-07

优化
master
fengyuan_yang 2 weeks ago
parent
commit
8926443012
  1. 20
      src/views/modules/qc/IPQCResultEntry.vue
  2. 40
      src/views/modules/qc/IQCResultEntry.vue

20
src/views/modules/qc/IPQCResultEntry.vue

@ -1566,16 +1566,28 @@
handler: function (newV, oldV) { handler: function (newV, oldV) {
this.detailData.notPassQty = this.detailData.samplingQty - this.detailData.passQty this.detailData.notPassQty = this.detailData.samplingQty - this.detailData.passQty
if (this.detailData.inspectionResult === '不合格') { if (this.detailData.inspectionResult === '不合格') {
if (this.detailData.disposalMeasures === '让步接收' || this.detailData.disposalMeasures === '') {
if (this.detailData.disposalMeasures === '让步接收') {
this.detailData.batchQualifiedQty = this.detailData.rollQty this.detailData.batchQualifiedQty = this.detailData.rollQty
} else if (this.detailData.disposalMeasures === '返工返修' || this.detailData.disposalMeasures === '拒收退回') {
this.detailData.batchQualifiedQty = 0
} else if (this.detailData.disposalMeasures === '挑选使用') { } else if (this.detailData.disposalMeasures === '挑选使用') {
this.detailData.batchQualifiedQty = this.detailData.rollQty - this.detailData.notPassQty 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.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: { detailList: {

40
src/views/modules/qc/IQCResultEntry.vue

@ -428,7 +428,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label>送检数量</label> <label>送检数量</label>
<el-input-number :controls="false" :step="0" v-model="detailData.rollCount" size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" v-model="detailData.rollCount" @change="rollCountChange" size="small" style="width: 100%"></el-input-number>
</div> </div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
@ -441,7 +441,7 @@
<div class="info-item"> <div class="info-item">
<label>合格数量</label> <label>合格数量</label>
<el-input-number :controls="false" :step="0" min="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number> <el-input-number :controls="false" :step="0" min="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" @change="passQtyChange" size="small" style="width: 100%"></el-input-number>
</div> </div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
@ -1220,6 +1220,11 @@
this.detailData.unqualifiedQty = num2 this.detailData.unqualifiedQty = num2
} }
}, },
'detailData.rollCount' () {
this.$nextTick(() => {
this.enforcePassQtyNotExceedRollCount()
})
}
}, },
data () { data () {
return { return {
@ -2445,6 +2450,37 @@
} }
qcPrint(this.IQCSelections) 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(){ noBatchQualifiedQtyChange(){
if (this.detailData.noBatchQualifiedQty > this.detailData.rollQty) { if (this.detailData.noBatchQualifiedQty > this.detailData.rollQty) {
// //

Loading…
Cancel
Save