|
|
@ -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>
|
|
|
@ -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();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 数据状态修改/Y合格N不合格
|
|
|
|
// 数据状态修改/Y合格N不合格
|
|
|
@ -319,6 +407,18 @@ 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) {
|
|
|
@ -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>
|
|
|
|