Merge remote-tracking branch 'origin/master'

master
mengjiao 6 months ago
commit 4a185e96db

@ -7,8 +7,60 @@
width="1400px"
>
<el-row :gutter="20">
<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-column width="50" align="center" type="selection">
</el-table-column>
@ -103,6 +155,7 @@
<el-form-item>
<el-button type="primary" @click="submitForm('dynamicValidateForm')"></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-form-item>
</el-form>
@ -131,11 +184,11 @@
</template>
<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";
export default {
name: "itemSelectUser",
dicts: ["check_result","qc_rule_prop"],
dicts: ["qc_rule_prop","material_type_oa","material_from_oa"],
data() {
return {
viewStatus : '0',
@ -168,6 +221,10 @@ export default {
//userName : ''
},
data:{},
form:{
checkResult: '1',
startOA: 'N',
},
dynamicValidateForm: {
domains: [{
value: ''
@ -177,6 +234,7 @@ export default {
valueOpen: false,
//id
recordId:'',
weight: null,
//belongTo
belongTo:'',
//
@ -196,6 +254,9 @@ export default {
}
]
},
rules: {
}
@ -258,6 +319,23 @@ export default {
this.queryParams.pageNum = 1;
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() {
@ -289,8 +367,17 @@ export default {
sampleQuality: this.data.sampleQuality,
incomeBatchNo: this.data.incomeBatchNo,
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.$emit('saveCheck');
this.showFlag = false;
@ -300,6 +387,7 @@ export default {
//
cancelForm() {
this.showFlag = false;
this.reset();
},
// /YN
@ -319,6 +407,18 @@ export default {
handleShowValue(row) {
this.valueOpen = true;
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) {
@ -421,7 +521,31 @@ export default {
this.$refs.defectForm.resetFields();
// defectForm.defectItems noOkQuality
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>

Loading…
Cancel
Save