|
|
@ -434,7 +434,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.samplingQty" size="small" style="width: 100%"></el-input-number> |
|
|
|
|
|
|
|
|
<el-input-number :controls="false" :step="0" v-model="detailData.samplingQty" @change="samplingQtyChange" size="small" style="width: 100%"></el-input-number> |
|
|
</div> |
|
|
</div> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="3"> |
|
|
<el-col :span="3"> |
|
|
@ -1223,6 +1223,7 @@ |
|
|
'detailData.rollCount' () { |
|
|
'detailData.rollCount' () { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.enforcePassQtyNotExceedRollCount() |
|
|
this.enforcePassQtyNotExceedRollCount() |
|
|
|
|
|
this.enforceSamplingQtyNotExceedRollCount() |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -2462,8 +2463,26 @@ |
|
|
} |
|
|
} |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.enforcePassQtyNotExceedRollCount() |
|
|
this.enforcePassQtyNotExceedRollCount() |
|
|
|
|
|
this.enforceSamplingQtyNotExceedRollCount() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
samplingQtyChange () { |
|
|
|
|
|
this.enforceSamplingQtyNotExceedRollCount() |
|
|
|
|
|
}, |
|
|
|
|
|
enforceSamplingQtyNotExceedRollCount () { |
|
|
|
|
|
if (this.detailData.submitFlag === 'Y') return |
|
|
|
|
|
const samplingQty = this.detailData.samplingQty |
|
|
|
|
|
if (samplingQty == null) return |
|
|
|
|
|
const rollCount = this.detailData.rollCount |
|
|
|
|
|
const rc = Number(rollCount) |
|
|
|
|
|
const sq = Number(samplingQty) |
|
|
|
|
|
if (isNaN(sq)) return |
|
|
|
|
|
if (isNaN(rc)) return |
|
|
|
|
|
if (sq > rc) { |
|
|
|
|
|
this.$set(this.detailData, 'samplingQty', 0) |
|
|
|
|
|
this.$message.warning('抽样数量不能大于送检数量!') |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
passQtyChange () { |
|
|
passQtyChange () { |
|
|
this.enforcePassQtyNotExceedRollCount() |
|
|
this.enforcePassQtyNotExceedRollCount() |
|
|
}, |
|
|
}, |
|
|
|