Merge remote-tracking branch 'origin/master'

master
mengjiao 6 months ago
commit 4a185e96db

@ -7,8 +7,60 @@
width="1400px" width="1400px"
> >
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24" :xs="24"> <el-col :span="24" :xs="24">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="最终判定结果" prop="checkResult">
<el-radio-group v-model="form.checkResult" >
<el-radio :label="'1'">合格</el-radio>
<el-radio :label="'0'">不合格</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="是否发起OA" prop="startOA">
<el-radio-group v-model="form.startOA">
<el-radio :label="'Y'"></el-radio>
<el-radio :label="'N'"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item v-if="form.startOA == 'Y'" label="来料类别" prop="materialType">
<el-select v-model="queryParams.materialType" placeholder="请选择检验规则属性" clearable>
<el-option
v-for="dict in dict.type.material_type_oa"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item v-if="form.startOA == 'Y'" label="物料来源" prop="materialType">
<el-select v-model="queryParams.materialFrom" placeholder="请选择检验规则属性" clearable>
<el-option
v-for="dict in dict.type.material_from_oa"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item v-if="form.startOA == 'Y'" label="不合格描述" prop="remark">
<el-input type='textarea' v-model="form.remark" placeholder="请输入不合格描述" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table v-loading="loading" :data="itemList" ref="myTable"> <el-table v-loading="loading" :data="itemList" ref="myTable">
<el-table-column width="50" align="center" type="selection"> <el-table-column width="50" align="center" type="selection">
</el-table-column> </el-table-column>
@ -49,7 +101,7 @@
>不良数量</el-button> >不良数量</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检测值" align="center" class-name="small-padding fixed-width" v-if="this.viewStatus != '1' "> <el-table-column label="检测值" align="center" class-name="small-padding fixed-width" v-if="this.viewStatus != '1' ">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -103,6 +155,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="submitForm('dynamicValidateForm')"></el-button> <el-button type="primary" @click="submitForm('dynamicValidateForm')"></el-button>
<el-button @click="addDomain"></el-button> <el-button @click="addDomain"></el-button>
<el-button v-if="this.weight === '1'" type="primary" icon="el-icon-refresh" @click="handleWeightValue"></el-button>
<el-button @click="resetForm('dynamicValidateForm')"></el-button> <el-button @click="resetForm('dynamicValidateForm')"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -131,11 +184,11 @@
</template> </template>
<script> <script>
import { getCkeckProjectList,changeCheckDetailStatus,commitActualValue,commitCheckResult,getDefectList} from "@/api/quality/income"; import { getCkeckProjectList,changeCheckDetailStatus,commitActualValue,commitCheckResult,getDefectList,getWeightValue} from "@/api/quality/income";
import { getDefectValue, commitDefectValue, updateDefectValue} from "@/api/quality/checkTaskDefect"; import { getDefectValue, commitDefectValue, updateDefectValue} from "@/api/quality/checkTaskDefect";
export default { export default {
name: "itemSelectUser", name: "itemSelectUser",
dicts: ["check_result","qc_rule_prop"], dicts: ["qc_rule_prop","material_type_oa","material_from_oa"],
data() { data() {
return { return {
viewStatus : '0', viewStatus : '0',
@ -168,6 +221,10 @@ export default {
//userName : '' //userName : ''
}, },
data:{}, data:{},
form:{
checkResult: '1',
startOA: 'N',
},
dynamicValidateForm: { dynamicValidateForm: {
domains: [{ domains: [{
value: '' value: ''
@ -177,6 +234,7 @@ export default {
valueOpen: false, valueOpen: false,
//id //id
recordId:'', recordId:'',
weight: null,
//belongTo //belongTo
belongTo:'', belongTo:'',
// //
@ -196,6 +254,9 @@ export default {
} }
] ]
}, },
rules: {
}
@ -258,6 +319,23 @@ export default {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
reset() {
this.form = {
checkResult: null,
startOA: null,
materialType: null,
materialFrom: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
projectType: null,
};
this.resetForm("form");
this.form.checkResult = '1';
this.form.startOA = 'N';
},
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
@ -289,8 +367,17 @@ export default {
sampleQuality: this.data.sampleQuality, sampleQuality: this.data.sampleQuality,
incomeBatchNo: this.data.incomeBatchNo, incomeBatchNo: this.data.incomeBatchNo,
qcCheckTaskDetails: this.rowData, qcCheckTaskDetails: this.rowData,
checkNo: this.data.checkNo,
materialCode: this.data.materialCode,
materialName: this.data.materialName,
supplierCode: this.data.supplierCode,
supplierName: this.data.supplierName,
quality: this.data.quality,
unit: this.data.unit,
} }
commitCheckResult(data).then(response => { //
const finalData = {...this.form,...data}
commitCheckResult(finalData).then(response => {
this.$modal.msgSuccess("检测完成"); this.$modal.msgSuccess("检测完成");
this.$emit('saveCheck'); this.$emit('saveCheck');
this.showFlag = false; this.showFlag = false;
@ -300,6 +387,7 @@ export default {
// //
cancelForm() { cancelForm() {
this.showFlag = false; this.showFlag = false;
this.reset();
}, },
// /YN // /YN
@ -319,7 +407,19 @@ export default {
handleShowValue(row) { handleShowValue(row) {
this.valueOpen = true; this.valueOpen = true;
this.recordId = row.recordId; this.recordId = row.recordId;
}, this.weight = row.weight;
const actualValue = row.actualValue;
if(actualValue !== null || actualValue !== ''){
this.dynamicValidateForm.domains = [];
let values = actualValue.split(",");
values.forEach((item,index) => {
this.dynamicValidateForm.domains.push({
value: item,
key: Date.now() + index
});
});
}
},
/** 不良类型弹窗 */ /** 不良类型弹窗 */
handleDefectType(row) { handleDefectType(row) {
this.defectForm.defectItems.forEach(item => { this.defectForm.defectItems.forEach(item => {
@ -421,7 +521,31 @@ export default {
this.$refs.defectForm.resetFields(); this.$refs.defectForm.resetFields();
// defectForm.defectItems noOkQuality // defectForm.defectItems noOkQuality
this.defectForm.defectItems.forEach(item => (item.noOkQuality = 0)); this.defectForm.defectItems.forEach(item => (item.noOkQuality = 0));
},
handleWeightValue() {
const recordId = this.recordId;
getWeightValue(recordId).then(response => {
if(response.code === 200) {
let value = response.msg;
if(value !== null || value !== ''){
let arr = value.split(",");
console.log(arr);
arr.forEach((item,index)=> {
this.dynamicValidateForm.domains.push({
value: item,
key: Date.now() + index
});
});
}
console.log(this.dynamicValidateForm.domains);
}else {
this.$modal.msgError(response.msg);
}
});
} }
} }
}; };
</script> </script>

@ -713,9 +713,9 @@ export default {
// //
handleCheckProject(row){ handleCheckProject(row){
if(row.checkStatus != '0'){ if(row.checkStatus != '0'){
this.$modal.msgSuccess("已经完成检验"); this.$modal.msgSuccess("已经完成检验");
return return
} }
this.$refs.itemSelectProject.showFlag = true; this.$refs.itemSelectProject.showFlag = true;
@ -728,7 +728,7 @@ export default {
}, },
// //
saveCheck(){ saveCheck(){
this.getList(); this.getList();
}, },
handleDefectType() { handleDefectType() {
const defectType = "material"; const defectType = "material";

Loading…
Cancel
Save