|
|
|
@ -453,27 +453,28 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList"> |
|
|
|
<!-- <el-form-item :label="'送检数量'">--> |
|
|
|
<!-- <el-input-number :controls="false" :step="0" v-model="detailData.rollQty" style="width: 85px"></el-input-number>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item :label="'抽样数量'">--> |
|
|
|
<!-- <el-input-number :controls="false" :step="0" v-model="detailData.samplingQty" style="width: 85px"></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: 85px"></el-input-number>--> |
|
|
|
<!-- <el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" style="width: 85px"></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: 85px"></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: 85px"></el-input-number>--> |
|
|
|
<!-- <el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" style="width: 85px"></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: 85px"></el-input-number>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<el-form-item style="margin-top: 13px;margin-left: 900px"> |
|
|
|
<el-form-item :label="'送检数量'"> |
|
|
|
<el-input-number :controls="false" :step="0" v-model="detailData.rollQty" style="width: 85px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'抽样数量'"> |
|
|
|
<el-input-number :controls="false" :step="0" v-model="detailData.samplingQty" style="width: 85px" @change="noPassQtyChange"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'合格数量'"> |
|
|
|
<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: 85px" @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: 85px" @change="noPassQtyChange"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'不合格数量'"> |
|
|
|
<el-input-number :controls="false" :step="0" :min="0" :max="Number(detailData.samplingQty) || 0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.notPassQty" disabled style="width: 85px"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" :min="0" :max="Number(detailData.samplingQty) || 0" v-else v-model="detailData.notPassQty" style="width: 85px" @change="noNotPassQtyChange"></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: 85px"></el-input-number> |
|
|
|
<el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" style="width: 85px"></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: 85px"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-top: 13px;margin-left: 405px"> |
|
|
|
<el-button type="primary" @click="previewFile(2)">预览SOP</el-button> |
|
|
|
<el-button v-if="detailData.submitFlag !== 'Y'" :loading="loadFlag" @click="dataAcquisition"> |
|
|
|
<svg t="1739002700745" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="38076" width="22" height="22"><path d="M922.000696 762.746435V465.363478l55.652174-0.111304v299.542261c0 131.695304-106.562783 239.571478-236.922435 239.571478H285.42887C155.158261 1004.365913 48.484174 896.623304 48.484174 764.794435V465.252174h59.258435v299.542261c0 101.843478 77.022609 179.712 177.775304 179.712H740.841739c100.61913 0 181.158957-79.916522 181.158957-181.76z" fill="#1D293F" p-id="38077"></path><path d="M290.148174 192.556522c20.301913-20.925217 30.47513-48.617739 30.47513-83.099826 0-72.548174-36.285217-108.833391-108.722087-108.833392H141.401043v223.365566h70.255305c32.055652-0.111304 58.167652-10.529391 78.491826-31.432348z m-105.227131-7.635479V39.446261h23.596522c19.70087 0 35.661913 6.166261 47.994435 18.632348 12.354783 12.466087 18.387478 29.740522 18.387478 52.001391 0 22.973217-5.921391 41.22713-17.652869 54.650435s-27.937391 20.190609-48.617739 20.190608H184.921043zM634.434783 595.366957h-84.057044V498.866087a102.511304 102.511304 0 0 0 74.262261-98.54887c0-56.230957-45.478957-102.310957-101.10887-102.310956-55.629913 0-101.086609 46.08-101.086608 102.310956 0 46.08 30.586435 85.25913 72.192 97.947826v96.990609h-81.252174c-16.829217-43.78713-50.688-99.283478-81.65287-143.070609a101.331478 101.331478 0 0 0 14.269218-52.001391c0-56.230957-45.946435-102.310957-102.177392-102.310956s-102.177391 46.08-102.177391 102.310956c0 56.230957 45.946435 102.310957 102.177391 102.310957 15.716174 0 30.72-3.628522 44.009739-10.017392 21.170087 34.326261 42.829913 74.351304 57.811479 102.778435h-73.906087l128.333913 130.493218 94.675478-108.966957v145.853217h-111.616l148.034783 148.858435 130.715826-148.858435h-111.504696v-129.402434l91.180522 92.516174 113.307826-130.248348h-53.203478c14.758957-28.42713 36.173913-68.452174 57.210434-102.800696 13.178435 6.41113 27.937391 10.039652 43.542261 10.039652 55.629913 0 101.086609-46.08 101.086609-102.310956 0-56.230957-45.456696-102.310957-101.086609-102.310957-55.652174 0-101.220174 46.08-101.220174 102.310957a102.4 102.4 0 0 0 14.135653 52.001391c-30.72 43.653565-64.200348 99.283478-80.896 142.937044z m-390.611479-148.48a46.614261 46.614261 0 0 1-46.436174-46.458435c0-25.510957 20.925217-46.436174 46.436174-46.436174s46.436174 20.925217 46.436174 46.436174-20.925217 46.436174-46.436174 46.436174z m279.819131 0c-25.266087 0-45.946435-20.925217-45.946435-46.458435 0-25.510957 20.702609-46.436174 45.968696-46.436174 25.266087 0 45.946435 20.925217 45.946434 46.436174s-20.680348 46.436174-45.946434 46.436174z m278.639304-93.005914c25.288348 0 45.968696 20.925217 45.968696 46.436174s-20.702609 46.436174-45.968696 46.436174c-25.266087 0-45.946435-20.925217-45.946435-46.436174s20.680348-46.436174 45.946435-46.436174zM395.130435 172.722087h74.128695l15.248696 51.155478h47.415652L458.707478 0.623304h-51.155478L332.8 223.98887h47.170783l15.11513-51.266783z m32.768-114.777044c1.825391-6.032696 3.027478-12.332522 3.517217-18.854956h1.202087c0.601043 8.102957 1.691826 14.514087 3.138783 19.456l23.218087 77.401043h-54.405566l23.329392-78.002087z m168.96 165.932522h43.631304V39.446261h58.189913V0.623304h-159.877565v38.956522h58.056348v184.297739z m169.894956-51.155478h74.128696l15.248696 51.155478h47.415652L830.330435 0.623304h-51.155478l-74.752 223.365566h47.193043l15.09287-51.266783z m32.768-114.777044c1.825391-6.032696 3.027478-12.332522 3.517218-18.854956h1.202087c0.601043 8.102957 1.691826 14.514087 3.161043 19.456l23.218087 77.401043h-54.427826l23.329391-78.002087z" fill="#FD9F01" p-id="38078"></path></svg> |
|
|
|
@ -492,7 +493,7 @@ |
|
|
|
<el-option label="合格" value="合格"></el-option> |
|
|
|
<el-option label="不合格" value="不合格"></el-option> |
|
|
|
</el-select> |
|
|
|
<el-select v-else v-model="detailData.inspectionResult" style="width: 100px" placeholder="请选择"> |
|
|
|
<el-select v-else v-model="detailData.inspectionResult" @change="resultChange" style="width: 100px" placeholder="请选择"> |
|
|
|
<el-option label="合格" value="合格"></el-option> |
|
|
|
<el-option label="不合格" value="不合格"></el-option> |
|
|
|
</el-select> |
|
|
|
@ -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() |
|
|
|
}, |
|
|
|
|
|
|
|
// 校验用户是否收藏 |
|
|
|
|