|
|
@ -376,7 +376,10 @@ |
|
|
<el-input type="number" style="width: 178px;" class="input_reight" v-model="saveHeaderData.qtyApprove" ></el-input> |
|
|
<el-input type="number" style="width: 178px;" class="input_reight" v-model="saveHeaderData.qtyApprove" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="不合格数量" > |
|
|
<el-form-item label="不合格数量" > |
|
|
<el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.qtyUnApprove" ></el-input> |
|
|
|
|
|
|
|
|
<el-input type="number" class="input_left" disabled style="width: 178px;" v-model="saveHeaderData.qtyUnApprove" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label=" " > |
|
|
|
|
|
<el-button type="primary" @click="addBad()">新增不良</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<fieldset class="customer-fieldset" style="width: 597px;margin-left: -10px;"> |
|
|
<fieldset class="customer-fieldset" style="width: 597px;margin-left: -10px;"> |
|
|
@ -409,6 +412,38 @@ |
|
|
<el-input style="width: 560px;" v-model="saveHeaderData.remark"></el-input> |
|
|
<el-input style="width: 560px;" v-model="saveHeaderData.remark"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
<div class="rq "> |
|
|
|
|
|
<el-table |
|
|
|
|
|
height="150" |
|
|
|
|
|
:data="badList" |
|
|
|
|
|
border> |
|
|
|
|
|
<el-table-column label="不良原因"> |
|
|
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
|
|
<el-select v-model="row.defectCode" placeholder="请选择" style="width: 100%;height: 12px;padding: 0px " filterable @change="changeSum" |
|
|
|
|
|
allow-create> |
|
|
|
|
|
<el-option v-for="item in defectList " :key="index" :label="item.defectNo+'-'+item.defectDesc" |
|
|
|
|
|
:value="item.defectNo"> |
|
|
|
|
|
|
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</template></el-table-column> |
|
|
|
|
|
<el-table-column label="不合格数" width="140"> |
|
|
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
|
|
<el-input type="number" v-model="row.defectQty" @change="changeSum"></el-input> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="100" |
|
|
|
|
|
label="操作"> |
|
|
|
|
|
<template slot-scope="scope" class="foo_container"> |
|
|
|
|
|
<a type="text" size="small" @click="deleteBad(scope.$index)">删除</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</div> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button @click="setUp.reviewFlag = false">取消</el-button> |
|
|
<el-button @click="setUp.reviewFlag = false">取消</el-button> |
|
|
<el-button type="primary" :disabled="setUp.saveButton" @click="saveReport()">确定</el-button> |
|
|
<el-button type="primary" :disabled="setUp.saveButton" @click="saveReport()">确定</el-button> |
|
|
@ -426,7 +461,9 @@ |
|
|
searchReportedQty, |
|
|
searchReportedQty, |
|
|
searchSeqNo, |
|
|
searchSeqNo, |
|
|
startSeqNo, |
|
|
startSeqNo, |
|
|
|
|
|
searchDefect, |
|
|
} from '@/api/production/schedule.js' |
|
|
} from '@/api/production/schedule.js' |
|
|
|
|
|
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
export default { |
|
|
export default { |
|
|
name: 'generateReport', |
|
|
name: 'generateReport', |
|
|
@ -445,6 +482,7 @@ |
|
|
factorFlag:false, |
|
|
factorFlag:false, |
|
|
abnormalList:[], |
|
|
abnormalList:[], |
|
|
saveHeaderData: { |
|
|
saveHeaderData: { |
|
|
|
|
|
badList:[], |
|
|
qtyRequire:'', |
|
|
qtyRequire:'', |
|
|
qtyUnApprove:'', |
|
|
qtyUnApprove:'', |
|
|
site: '', |
|
|
site: '', |
|
|
@ -532,7 +570,8 @@ |
|
|
currentData:'', |
|
|
currentData:'', |
|
|
tagNo2:'', |
|
|
tagNo2:'', |
|
|
startModalFlag:false, |
|
|
startModalFlag:false, |
|
|
|
|
|
|
|
|
|
|
|
badList:[], |
|
|
|
|
|
defectList:[], |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted () { |
|
|
mounted () { |
|
|
@ -593,6 +632,12 @@ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.setUp.saveButton=true; |
|
|
this.setUp.saveButton=true; |
|
|
|
|
|
this.saveHeaderData.badList=[]; |
|
|
|
|
|
for (let i = 0; i < this.badList.length ; i++) { |
|
|
|
|
|
if(this.badList[i].defectQty!==''&&this.badList[i].defectCode!==''){ |
|
|
|
|
|
this.saveHeaderData.badList.push(this.badList[i]) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
saveGenerateReportForSchedule(this.saveHeaderData).then(({data}) => { |
|
|
saveGenerateReportForSchedule(this.saveHeaderData).then(({data}) => { |
|
|
if (data.code == 0) { |
|
|
if (data.code == 0) { |
|
|
this.$message.success(data.msg) |
|
|
this.$message.success(data.msg) |
|
|
@ -627,6 +672,9 @@ |
|
|
strVal = this.searchData.operatorName |
|
|
strVal = this.searchData.operatorName |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// if (val === 1020) { |
|
|
|
|
|
// |
|
|
|
|
|
// } |
|
|
if (val === 88) { |
|
|
if (val === 88) { |
|
|
strVal = this.searchData.sResourceID |
|
|
strVal = this.searchData.sResourceID |
|
|
} |
|
|
} |
|
|
@ -654,6 +702,9 @@ |
|
|
if (this.tagNo === 88) { |
|
|
if (this.tagNo === 88) { |
|
|
this.searchData.sResourceID = val.ResourceID |
|
|
this.searchData.sResourceID = val.ResourceID |
|
|
} |
|
|
} |
|
|
|
|
|
// if (this.tagNo === 1020) { |
|
|
|
|
|
// this.searchData.sResourceID = val.ResourceID |
|
|
|
|
|
// } |
|
|
}, |
|
|
}, |
|
|
initReportModal (row) { |
|
|
initReportModal (row) { |
|
|
this.scanSeqNo=row.seqNo |
|
|
this.scanSeqNo=row.seqNo |
|
|
@ -730,6 +781,9 @@ |
|
|
}) |
|
|
}) |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
this.searchDefect() |
|
|
|
|
|
this.badList=[]; |
|
|
|
|
|
this.saveHeaderData.badList=[]; |
|
|
this.saveHeaderData.qtyApprove=0 |
|
|
this.saveHeaderData.qtyApprove=0 |
|
|
this.saveHeaderData.qtyUnApprove=0 |
|
|
this.saveHeaderData.qtyUnApprove=0 |
|
|
this.saveHeaderData.qtyRework=0 |
|
|
this.saveHeaderData.qtyRework=0 |
|
|
@ -791,7 +845,13 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
addBad(){ |
|
|
|
|
|
let inData={ |
|
|
|
|
|
defectCode:'', |
|
|
|
|
|
defectQty:'', |
|
|
|
|
|
} |
|
|
|
|
|
this.badList.push(inData) |
|
|
|
|
|
}, |
|
|
startSeqNo(){ |
|
|
startSeqNo(){ |
|
|
let inData={ |
|
|
let inData={ |
|
|
username:this.$store.state.user.name, |
|
|
username:this.$store.state.user.name, |
|
|
@ -819,6 +879,26 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
deleteBad (index) { |
|
|
|
|
|
|
|
|
|
|
|
this.badList.splice(index, 1) |
|
|
|
|
|
this.changeSum() |
|
|
|
|
|
}, |
|
|
|
|
|
changeSum(){ |
|
|
|
|
|
this.saveHeaderData.qtyUnApprove=0 |
|
|
|
|
|
for (let i = 0; i <this.badList.length ; i++) { |
|
|
|
|
|
if(this.badList[i].defectQty!==''&&this.badList[i].defectCode!==''){ |
|
|
|
|
|
this.saveHeaderData.qtyUnApprove= Number(this.badList[i].defectQty)+Number(this.saveHeaderData.qtyUnApprove) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
searchDefect(){ |
|
|
|
|
|
searchDefect().then(({data}) => { |
|
|
|
|
|
if (data.code == 0) { |
|
|
|
|
|
this.defectList = data.rows; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
created () { |
|
|
created () { |
|
|
|
|
|
|
|
|
|