From 4e2b8719ff4296831a9ef05faa6e91ce6a7b0bc7 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期五, 19 一月 2024 16:44:05 +0800 Subject: [PATCH] 模具管理模块 --- src/views/quality/rawMaterial/rawMaterial-form.vue | 70 +++++++++++++++++------------------ 1 files changed, 34 insertions(+), 36 deletions(-) diff --git a/src/views/quality/rawMaterial/rawMaterial-form.vue b/src/views/quality/rawMaterial/rawMaterial-form.vue index 53a8f6a..0afc28b 100644 --- a/src/views/quality/rawMaterial/rawMaterial-form.vue +++ b/src/views/quality/rawMaterial/rawMaterial-form.vue @@ -173,9 +173,9 @@ <template slot-scope="scope"> <div v-if="!scope.row.children"> <el-tooltip :disabled="scope.row.deviceId != null" class="item" effect="dark" content="璇峰厛閫夋嫨璁惧锛�" placement="top-start"> - <!-- <el-autocomplete clearable + <el-autocomplete clearable :disabled="scope.row.deviceId == null || (dataForm.id!=null&&resultVal!=null)" - @blur="changeState(scope.row,scope.$index)" + @input="changeState(scope.row,scope.$index)" v-model="scope.row.testValueList[index]" :fetch-suggestions="querySearch" placeholder="璇疯緭鍏ユ垨閫夋嫨妫�娴嬪��" > @@ -183,9 +183,9 @@ <template slot-scope="{ item }"> <div>{{ item.value }}</div> </template> - </el-autocomplete> --> + </el-autocomplete> - <el-select style="width:100%" filterable + <!-- <el-select style="width:100%" filterable :disabled="scope.row.deviceId == null || (dataForm.id!=null&&resultVal!=null)" v-model="scope.row.testValueList[index]" placeholder="璇疯緭鍏ユ垨閫夋嫨妫�娴嬪��" @@ -196,7 +196,7 @@ > <el-option label="鏄�" value="鏄�"/> <el-option label="鍚�" value="鍚�"/> - </el-select> + </el-select> --> </el-tooltip> </div> </template> @@ -887,43 +887,41 @@ console.log(e.target.value); }, changeState(row, index) { - this.$nextTick(()=>{ - if(row){ - let isTrue = true - for(var i=0;i<row.testValueList.length;i++){ - let val = row.testValueList[i] - let reg = /(^-?[0-9]{1,6}$)|(^-?[0-9]{1,6}[\.]{1}[0-9]{1,3}$)/ - if(!reg.test(val) && !['鏄�','鍚�'].includes(val)){ - row.testValueList[i] = null - this.$message.error("璇疯緭鍏ユ暟瀛楁垨閫夋嫨鏄惁") - isTrue = false - } - } - if(!isTrue){ - return - } - } - if (row.rpId != null && row.rpId != '') { - let val = row.testValueList.join(",") - if (val === undefined || val === '' || val === null) { - return + if(row){ + let isTrue = true + for(var i=0;i<row.testValueList.length;i++){ + let val = row.testValueList[i] + let reg = /(^-?[0-9]{1,6}$)|(^-?[0-9]{1,6}[\.]{1}[0-9]{1,3}$)/ + if(!reg.test(val) && !['鏄�','鍚�'].includes(val)){ + row.testValueList[i] = null + this.$message.error("璇疯緭鍏�6浣嶆暟瀛楁垨閫夋嫨鏄惁") + isTrue = false + } } - let obj = { + if(!isTrue){ + return + } + } + if (row.rpId != null && row.rpId != '') { + let val = row.testValueList.join(",") + if (val === undefined || val === '' || val === null) { + return + } + let obj = { deviceId: row.deviceId, rpId: row.rpId, testValue: val, note: row.note - } - updateRawInsProduct(obj).then(res => { - if (res.data.code == 0) { - this.$message.success("鏇存柊鎴愬姛") - } else { - this.$message.error("鏇存柊澶辫触") - } - this.init(this.dataForm.id) - }) } - }) + updateRawInsProduct(obj).then(res => { + if (res.data.code == 0) { + this.$message.success("鏇存柊鎴愬姛") + } else { + this.$message.error("鏇存柊澶辫触") + } + this.init(this.dataForm.id) + }) + } }, // 鍒犻櫎瀛愰」鐩� delChildren(row,index,isParent) { -- Gitblit v1.9.3