|
|
|
@ -230,24 +230,28 @@ |
|
|
|
<el-input-number :controls="false" :step="0" v-model="detailData.rollQty" disabled style="width: 81px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'送检数量'"> |
|
|
|
<el-input-number :controls="false" :step="0" v-model="detailData.rollCount" style="width: 81px"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" v-model="detailData.rollCount" style="width: 81px" @change="noRollCountChange"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'抽样数量'"> |
|
|
|
<el-input-number :controls="false" :step="0" v-model="detailData.samplingQty" style="width: 81px"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" v-model="detailData.samplingQty" style="width: 81px" @change="noSamplingQtyChange"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'合格数量'"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled style="width: 81px"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" style="width: 81px"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" :min="0" :max="Number(detailData.samplingQty) || 0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled style="width: 81px" @change="noPassQtyChange"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" :min="0" :max="Number(detailData.samplingQty) || 0" v-else v-model="detailData.passQty" style="width: 81px" @change="noPassQtyChange"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'不合格数量'"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="detailData.notPassQty" disabled style="width: 81px"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" :min="0" v-model="detailData.notPassQty" disabled style="width: 81px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'不合格项目数量'"> |
|
|
|
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled style="width: 81px"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" style="width: 81px"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled style="width: 81px" @change="noBatchQualifiedQtyChange"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" style="width: 81px" @change="noUnqualifiedQtyChange"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item :label="'批次不合格数'"> |
|
|
|
<el-input-number :controls="false" :step="0" :min="0" v-model="detailData.noBatchQualifiedQty" style="width: 81px" @change="noBatchQualifiedQtyChange"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'批次合格数'"> |
|
|
|
<el-input-number :controls="false" :step="0" min="0" v-model="detailData.batchQualifiedQty" disabled style="width: 81px"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" :min="0" v-model="detailData.batchQualifiedQty" disabled style="width: 81px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-top: 13px;margin-left: 332px"> |
|
|
|
<el-button v-if="detailData.submitFlag !== 'Y'" :loading="loadFlag" @click="dataAcquisition"> |
|
|
|
@ -832,22 +836,28 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
detailData: { |
|
|
|
deep: true, |
|
|
|
handler: function (newV, oldV) { |
|
|
|
this.detailData.notPassQty = this.detailData.samplingQty - this.detailData.passQty |
|
|
|
if (this.detailData.inspectionResult === '不合格') { |
|
|
|
if (this.detailData.disposalMeasures === '让步接收') { |
|
|
|
detailData: { |
|
|
|
deep: true, |
|
|
|
handler: function (newV, oldV) { |
|
|
|
const samplingQty = Number(this.detailData.samplingQty) |
|
|
|
const passQty = Number(this.detailData.passQty) |
|
|
|
if (!Number.isNaN(samplingQty) && !Number.isNaN(passQty) && passQty > samplingQty) { |
|
|
|
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 |
|
|
|
} 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 if (this.detailData.inspectionResult === '合格'){ |
|
|
|
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 = this.detailData.rollQty |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
detailList: { |
|
|
|
deep: true, |
|
|
|
@ -1807,7 +1817,8 @@ |
|
|
|
state: '', |
|
|
|
passQty: '', |
|
|
|
notPassQty: '', |
|
|
|
batchQualifiedQty: '' |
|
|
|
batchQualifiedQty: '', |
|
|
|
noBatchQualifiedQty:'', |
|
|
|
}, |
|
|
|
detailInformationFlag: false, |
|
|
|
iqcRecordOverFlag: false, |
|
|
|
@ -2720,6 +2731,7 @@ |
|
|
|
this.detailData.responsiblePersonName = row.responsiblePersonName |
|
|
|
this.detailData.invdefinetype = row.invdefinetype |
|
|
|
this.detailData.state = row.state |
|
|
|
|
|
|
|
// if (row.state === '待检验') { |
|
|
|
// this.detailData.passQty = row.samplingQty |
|
|
|
// } else { |
|
|
|
@ -2729,6 +2741,7 @@ |
|
|
|
//2025/9/8 海波更改 合格数量 不合格数量 |
|
|
|
this.detailData.passQty = row.passQty |
|
|
|
this.detailData.notPassQty = row.notPassQty |
|
|
|
this.detailData.noBatchQualifiedQty = this.detailData.samplingQty - this.detailData.passQty |
|
|
|
this.detailData.batchQualifiedQty = row.batchQualifiedQty |
|
|
|
this.getInspectionFormData() |
|
|
|
this.inspectorSearch() |
|
|
|
@ -3463,6 +3476,56 @@ |
|
|
|
this.authFile = !fileFlag |
|
|
|
this.authCancelCheck = !cancelCheckFlag |
|
|
|
}, |
|
|
|
noUnqualifiedQtyChange(){ |
|
|
|
if (this.detailData.unqualifiedQty > this.detailData.rollCount) { |
|
|
|
// 恢复原值 |
|
|
|
this.$set(this.detailData, 'unqualifiedQty', parseInt(this.detailData.rollCount)) |
|
|
|
this.$message.warning('不合格项目数量不能大于送检数量!') |
|
|
|
} |
|
|
|
}, |
|
|
|
noRollCountChange(){ |
|
|
|
if (parseInt(this.detailData.rollCount) > parseInt(this.detailData.rollQty)) { |
|
|
|
// 恢复原值 |
|
|
|
this.$set(this.detailData, 'rollCount', parseInt(this.detailData.rollQty)) |
|
|
|
this.$message.warning('送检数量不能大于到货数量!') |
|
|
|
} |
|
|
|
this.noSamplingQtyChange() |
|
|
|
this.noPassQtyChange() |
|
|
|
}, |
|
|
|
noSamplingQtyChange(){ |
|
|
|
const samplingQty = Number(this.detailData.samplingQty) |
|
|
|
const rollCount = Number(this.detailData.rollCount) |
|
|
|
if (!Number.isNaN(samplingQty) && !Number.isNaN(rollCount) && samplingQty > rollCount) { |
|
|
|
// 恢复原值 |
|
|
|
this.$set(this.detailData, 'samplingQty', rollCount) |
|
|
|
this.$message.warning('抽检数量不能大于送检数量!') |
|
|
|
} |
|
|
|
this.noPassQtyChange() |
|
|
|
}, |
|
|
|
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('合格数量不能大于送检数量!') |
|
|
|
// 延后一帧回写,避免被 input-number 本次输入流程覆盖 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$set(this.detailData, 'passQty', samplingQty) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
noBatchQualifiedQtyChange(){ |
|
|
|
if (this.detailData.noBatchQualifiedQty > this.detailData.rollQty) { |
|
|
|
// 恢复原值 |
|
|
|
this.detailData.noBatchQualifiedQty = this.detailData.rollQty - this.detailData.batchQualifiedQty |
|
|
|
this.$message.warning('批次不合格数量不能大于到货数量!') |
|
|
|
} |
|
|
|
// 给合格数量赋值 |
|
|
|
let newValue = this.detailData.rollQty - this.detailData.noBatchQualifiedQty |
|
|
|
this.$set(this.detailData, 'batchQualifiedQty', newValue) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|