From b98bb5a14531d68e3ee1a483a79899de0de47704 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期一, 06 五月 2024 17:26:06 +0800 Subject: [PATCH] 优化质量模块 --- src/views/quality/processInspect/processInspect-form.vue | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/views/quality/processInspect/processInspect-form.vue b/src/views/quality/processInspect/processInspect-form.vue index f1fa506..7980cef 100644 --- a/src/views/quality/processInspect/processInspect-form.vue +++ b/src/views/quality/processInspect/processInspect-form.vue @@ -401,7 +401,7 @@ <el-input v-model="ruleForm.number"></el-input> </el-form-item> <el-form-item label="鎵规鍙�" prop="outBatchNo"> - <el-select v-model="ruleForm.outBatchNo" multiple placeholder="璇烽�夋嫨鎵规鍙�" style="width: 100%;"> + <el-select v-model="ruleForm.outBatchNo" multiple placeholder="璇烽�夋嫨鎵规鍙�" style="width: 100%;" :multiple-limit="Number(ruleForm.number)"> <el-option :label="m" :value="m" v-for="(m,i) in outBatchNoList" :key="i"></el-option> </el-select> </el-form-item> @@ -458,7 +458,7 @@ { pattern: /^\d+$/, message: '璇疯緭鍏ユ暟瀛�', trigger: 'blur' } ], outBatchNo: [ - { required: true, message: '璇烽�夋嫨鎵规鍙�', trigger: 'change' } + { required: true, message: '璇烽�夋嫨鎵规鍙�', trigger: 'change' }, ], }, unqualified:false, @@ -739,6 +739,10 @@ handleSubmit(){ this.$refs.ruleForm.validate((valid) => { if (valid) { + if(this.ruleForm.outBatchNo.length!=this.ruleForm.number){ + this.$message.error(`璇烽�夋嫨${this.ruleForm.number}涓壒娆″彿`) + return + } this.loading = true; let obj = {number:this.ruleForm.number,outBatchNo:this.ruleForm.outBatchNo.join(','),...this.unqualifiedInfo}; updateProcessInspectsById(obj).then(res => { @@ -809,8 +813,10 @@ arr = obj.inspectionValue.split(",") } this.$set(obj, "empiricalValueAddss", arr) + this.$set(obj, "inote", obj.inote) if(!obj.inote){ - obj.inote = null + // obj.inote = null + this.$set(obj, "inote", null) } if (arr.length > this.empiricalValueAdd) { this.empiricalValueAdd = arr.length @@ -1001,7 +1007,7 @@ } else { if (_than.empiricalValueAddMaxNumber != _than.empiricalValueAdd - 1) { _than.empiricalValueAdd = _than.empiricalValueAdd - 1; - // _than.changeRowResult() + _than.changeRowResult() _than.inspectionItems.forEach(i => { if(i.children){ i.children.forEach(ele=>{ -- Gitblit v1.9.3