|
|
|
@ -13,22 +13,22 @@
|
|
|
|
|
<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 :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 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 :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 v-if="form.startOA == 'Y'" label="来料类别" prop="materialType">
|
|
|
|
|
<el-select v-model="queryParams.materialType" placeholder="请选择检验规则属性" clearable>
|
|
|
|
|
<el-form-item v-if="form.startOA == '1'" label="来料类别" prop="materialType">
|
|
|
|
|
<el-select v-model="form.materialType" placeholder="请选择检验规则属性" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.material_type_oa"
|
|
|
|
|
:key="dict.value"
|
|
|
|
@ -41,8 +41,8 @@
|
|
|
|
|
</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-form-item v-if="form.startOA == '1'" label="物料来源" prop="materialType">
|
|
|
|
|
<el-select v-model="form.materialFrom" placeholder="请选择检验规则属性" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.material_from_oa"
|
|
|
|
|
:key="dict.value"
|
|
|
|
@ -53,7 +53,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="14">
|
|
|
|
|
<el-form-item v-if="form.startOA == 'Y'" label="不合格描述" prop="remark">
|
|
|
|
|
<el-form-item v-if="form.startOA == '1'" label="不合格描述" prop="remark">
|
|
|
|
|
<el-input type='textarea' v-model="form.remark" placeholder="请输入不合格描述" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -139,7 +139,7 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!--测量值弹窗-->
|
|
|
|
|
<el-dialog title="测量值" :visible.sync="valueOpen" width="600px" append-to-body>
|
|
|
|
|
<el-form :model="dynamicValidateForm" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic">
|
|
|
|
|
<el-form :model="dynamicValidateForm" v-loading="dyloading" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic">
|
|
|
|
|
<el-form-item
|
|
|
|
|
v-for="(domain, index) in dynamicValidateForm.domains"
|
|
|
|
|
:label="'测量值' + index"
|
|
|
|
@ -156,7 +156,7 @@
|
|
|
|
|
<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-button @click="handleResetForm()">重置</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-dialog>
|
|
|
|
@ -193,6 +193,7 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
viewStatus : '0',
|
|
|
|
|
showFlag: false,
|
|
|
|
|
dyloading: false,
|
|
|
|
|
// 选中数组
|
|
|
|
|
selectedRows: {},
|
|
|
|
|
// 非单个禁用
|
|
|
|
@ -222,8 +223,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data:{},
|
|
|
|
|
form:{
|
|
|
|
|
checkResult: '1',
|
|
|
|
|
startOA: 'N',
|
|
|
|
|
checkResult: 'Y',
|
|
|
|
|
startOA: '0',
|
|
|
|
|
},
|
|
|
|
|
dynamicValidateForm: {
|
|
|
|
|
domains: [{
|
|
|
|
@ -333,8 +334,8 @@ export default {
|
|
|
|
|
projectType: null,
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
this.form.checkResult = '1';
|
|
|
|
|
this.form.startOA = 'N';
|
|
|
|
|
this.form.checkResult = 'Y';
|
|
|
|
|
this.form.startOA = '0';
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
@ -389,6 +390,10 @@ export default {
|
|
|
|
|
this.showFlag = false;
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
// 使用nextTick解决循环引用问题
|
|
|
|
|
handleResetForm() {
|
|
|
|
|
this.dynamicValidateForm.domains = [{ value: ''}];
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 数据状态修改/Y合格N不合格
|
|
|
|
|
/* handleStatusChange(row) {
|
|
|
|
@ -405,16 +410,17 @@ export default {
|
|
|
|
|
//动态测量值
|
|
|
|
|
/** 检测结果钮操作 */
|
|
|
|
|
handleShowValue(row) {
|
|
|
|
|
this.handleResetForm();
|
|
|
|
|
this.valueOpen = true;
|
|
|
|
|
this.recordId = row.recordId;
|
|
|
|
|
this.weight = row.weight;
|
|
|
|
|
const actualValue = row.actualValue;
|
|
|
|
|
if(actualValue !== null || actualValue !== ''){
|
|
|
|
|
if(actualValue !== null && actualValue !== '') {
|
|
|
|
|
this.dynamicValidateForm.domains = [];
|
|
|
|
|
let values = actualValue.split(",");
|
|
|
|
|
values.forEach((item,index) => {
|
|
|
|
|
this.dynamicValidateForm.domains.push({
|
|
|
|
|
value: item,
|
|
|
|
|
value: item.toString(),
|
|
|
|
|
key: Date.now() + index
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
@ -523,13 +529,14 @@ export default {
|
|
|
|
|
this.defectForm.defectItems.forEach(item => (item.noOkQuality = 0));
|
|
|
|
|
},
|
|
|
|
|
handleWeightValue() {
|
|
|
|
|
this.dyloading = true;
|
|
|
|
|
const recordId = this.recordId;
|
|
|
|
|
getWeightValue(recordId).then(response => {
|
|
|
|
|
if(response.code === 200) {
|
|
|
|
|
let value = response.msg;
|
|
|
|
|
if(value !== null || value !== ''){
|
|
|
|
|
if(value !== null && value !== ''){
|
|
|
|
|
let arr = value.split(",");
|
|
|
|
|
console.log(arr);
|
|
|
|
|
this.dynamicValidateForm.domains = [];
|
|
|
|
|
arr.forEach((item,index)=> {
|
|
|
|
|
this.dynamicValidateForm.domains.push({
|
|
|
|
|
value: item,
|
|
|
|
@ -537,8 +544,7 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(this.dynamicValidateForm.domains);
|
|
|
|
|
this.dyloading = false;
|
|
|
|
|
}else {
|
|
|
|
|
this.$modal.msgError(response.msg);
|
|
|
|
|
}
|
|
|
|
|