@ -170,22 +170,29 @@
< el -input v-model ="detailData.partDesc" disabled style="width: 220px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item :label ="'计量单位'" >
< el -input v-model ="detailData.umId" disabled style="width: 12 0px" > < / el -input >
< el -input v-model ="detailData.umId" disabled style="width: 8 0px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item :label ="'到货数量'" >
< el -input class = "numInput" v-model ="detailData.rollQty" type="number" disabled style="width: 12 0px" > < / el -input >
< el -input class = "numInput" v-model ="detailData.rollQty" type="number" disabled style="width: 8 0px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item :label ="'送检数量'" >
< el -input class = "numInput" v-model ="detailData.rollCount" readonly type="number" style="width: 12 0px" > < / el -input >
< el -input class = "numInput" v-model ="detailData.rollCount" type="number" style="width: 8 0px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item :label ="'抽样数量'" >
< el -input class = "numInput" v-model ="detailData.samplingQty" readonly type="number" style="width: 12 0px" > < / el -input >
< el -input class = "numInput" v-model ="detailData.samplingQty" type="number" style="width: 8 0px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item :label ="'不合格项目数量'" >
< el -input class = "numInput" v-if ="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled type="number" style="width: 80px" > < / el -input >
< el -input class = "numInput" v -else @input ="handleInput(detailData.unqualifiedQty,1)" v-model ="detailData.unqualifiedQty" type="number" style="width: 80px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item : label = "' '" style = "margin-left: 50px" >
< el -form -item :label ="'合格数量'" >
< el -input class = "numInput" v-if ="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled type="number" style="width: 80px" > < / el -input >
< el -input class = "numInput" v -else @input ="handleInput(detailData.passQty,2)" v-model ="detailData.passQty" type="number" style="width: 80px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item :label ="'不合格数量'" >
< el -input class = "numInput" v-model ="detailData.notPassQty" type="number" disabled style="width: 80px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item : label = "' '" style = "margin-left: 25px" >
< el -button type = "primary" @click ="getFileContentData(detailData)" > 工作文件 < / el -button >
< / e l - f o r m - i t e m >
< / e l - f o r m >
@ -195,14 +202,14 @@
< el -option label = "合格" value = "合格" > < / e l - o p t i o n >
< el -option label = "不合格" value = "不合格" > < / e l - o p t i o n >
< / e l - s e l e c t >
< 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 = "合格" > < / e l - o p t i o n >
< el -option label = "不合格" value = "不合格" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< el -form -item :label ="'质检备注'" >
< el -input v-if ="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 28 0px" > < / el -input >
< el -input v -else v-model ="detailData.inspectionRemark" style="width: 28 0px" > < / el -input >
< el -input v-if ="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 31 0px" > < / el -input >
< el -input v -else v-model ="detailData.inspectionRemark" style="width: 31 0px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "检验员" >
< el -select v-if ="detailData.submitFlag === 'Y'" v-model="detailData.inspectorNo" disabled placeholder="请选择" style="width: 100px" >
@ -232,7 +239,7 @@
< span v -else style = "cursor: pointer" slot = "label" @click ="getResponsiblePersonList" > < a > 责任人 < / a > < / span >
< el -input v-model ="detailData.responsiblePersonName" readonly style="width: 224px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item : label = "' '" style = "margin-left: 47 px" >
< el -form -item : label = "' '" style = "margin-left: 20 px" >
< el -button type = "primary" icon = "el-icon-upload" @click ="subDetailUpload" > 明细导入 < / el -button >
< / e l - f o r m - i t e m >
< / e l - f o r m >
@ -580,6 +587,12 @@
subDetailUpload
} ,
watch : {
detailData : {
deep : true ,
handler : function ( newV , oldV ) {
this . detailData . notPassQty = this . detailData . samplingQty - this . detailData . passQty
}
} ,
detailList : {
deep : true ,
handler : function ( newV , oldV ) {
@ -1334,7 +1347,9 @@
operator : '' ,
operatorName : '' ,
responsiblePerson : '' ,
responsiblePersonName : ''
responsiblePersonName : '' ,
passQty : '' ,
notPassQty : ''
} ,
detailInformationFlag : false ,
detailList : [ ] ,
@ -1356,7 +1371,9 @@
operatorName : '' ,
responsiblePerson : '' ,
responsiblePersonName : '' ,
subDetailList : [ ]
subDetailList : [ ] ,
passQty : '' ,
notPassQty : ''
} ,
/ / 子 明 细 数 据 对 象
tableData : [ ] ,
@ -1485,6 +1502,12 @@
} ,
methods : {
/ / 检 验 结 论 改 变 事 件
resultChange ( ) {
if ( this . detailData . inspectionResult === '不合格' ) {
this . detailData . passQty = 0
}
} ,
/ / 数 据 采 集
dataAcquisition ( ) {
this . loadFlag = true
@ -1730,6 +1753,8 @@
}
if ( type === 1 ) {
this . detailData . unqualifiedQty = val
} else if ( type === 2 ) {
this . detailData . passQty = val
}
} ,
@ -1879,6 +1904,16 @@
this . $message . warning ( ` 暂不支持预览 ${ row . fileType . toLowerCase ( ) } 文件 ` )
return ;
}
/ / d o w n L o a d O b j e c t F i l e ( r o w ) . t h e n ( ( { d a t a } ) = > {
/ / c o n s t b l o b = n e w B l o b ( [ d a t a ] , { t y p e : t y p e } ) ;
/ / / / 创 建 U R L 来 生 成 预 览
/ / c o n s t f i l e U R L = U R L . c r e a t e O b j e c t U R L ( b l o b ) ;
/ / / / a l e r t ( b l o b )
/ / l o c a l S t o r a g e . s e t I t e m ( " i m g U r l " , f i l e U R L )
/ / w i n d o w . o p e n ( w i n d o w . l o c a t i o n . o r i g i n + " / # / i m a g e " , ' _ b l a n k ' )
/ / / / 在 新 标 签 页 中 打 开 文 件 预 览
/ / / / c o n s t n e w T a b = w i n d o w . o p e n ( f i l e U R L , ' _ b l a n k ' )
/ / } )
downLoadObjectFile ( row ) . then ( ( { data } ) => {
const blob = new Blob ( [ data ] , { type : type } ) ;
/ / 创 建 U R L 来 生 成 预 览
@ -2031,6 +2066,8 @@
this . saveInformationData . operator = this . detailData . operator
this . saveInformationData . responsiblePerson = this . detailData . responsiblePerson
this . saveInformationData . itemList = JSON . parse ( JSON . stringify ( this . detailList ) )
this . saveInformationData . passQty = this . detailData . passQty == null ? 0 : this . detailData . passQty
this . saveInformationData . notPassQty = this . detailData . notPassQty == null ? 0 : this . detailData . notPassQty
/ / t h i s . s a v e I n f o r m a t i o n D a t a . s u b D e t a i l L i s t = t h i s . a c q u i s i t i o n L i s t
saveFQASDetailedRecord ( this . saveInformationData ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
@ -2105,6 +2142,8 @@
this . detailData . operatorName = row . operatorName
this . detailData . responsiblePerson = row . responsiblePerson
this . detailData . responsiblePersonName = row . responsiblePersonName
this . detailData . passQty = row . passQty
this . detailData . notPassQty = row . notPassQty
this . getInspectionFormData ( )
this . inspectorSearch ( )
/ / t h i s . a c q u i s i t i o n L i s t = [ ]