From cb9982ee70a2817cd2716a0f0a15ab1299c3edf3 Mon Sep 17 00:00:00 2001 From: Rui_Li <877258667@qq.com> Date: Mon, 13 Jan 2025 14:16:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=85=B7Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/tooling/components/com_tool_info_add_update.vue | 6 +++++- src/views/modules/tooling/manuf_tool.vue | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/modules/tooling/components/com_tool_info_add_update.vue b/src/views/modules/tooling/components/com_tool_info_add_update.vue index 6275c4d..e10041b 100644 --- a/src/views/modules/tooling/components/com_tool_info_add_update.vue +++ b/src/views/modules/tooling/components/com_tool_info_add_update.vue @@ -146,6 +146,7 @@ export default { showDefault: false, visible: false, addFlag: false, + searchFlag: false, pageData: { site: this.$store.state.user.site, username: this.$store.state.user.name, @@ -342,12 +343,14 @@ export default { this.pageData.propertyNo = ''; this.pageData.lastUsed = ''; this.pageData.noteText = ''; + this.searchFlag = false; //新增结束调用获取默认的方法 this.changeToolPrefix(); }else{ this.titleCon = '工具修改'; this.pageData = JSON.parse(JSON.stringify(toolInfo)); this.pageData.username = this.$store.state.user.name; + this.searchFlag = false; } this.pageData.addFlag = addFlag; this.addFlag = addFlag; @@ -357,7 +360,7 @@ export default { closeDialog(){ //刷新原页面的数据 this.$emit('refreshTooInfoData'); - this.$emit('changeCurrentToolInfo', this.pageData) + this.$emit('changeCurrentToolInfo', this.pageData, this.searchFlag) //关闭当前的页面 this.visible = false; //this.$emit('update:visible', false); @@ -432,6 +435,7 @@ export default { if (this.addFlag){ insertToolInfo(this.pageData).then(({data}) =>{ if(data.code === 200){ + this.searchFlag = true; this.$message.success('操作成功!'); this.closeDialog(); }else{ diff --git a/src/views/modules/tooling/manuf_tool.vue b/src/views/modules/tooling/manuf_tool.vue index d27fd9b..e240214 100644 --- a/src/views/modules/tooling/manuf_tool.vue +++ b/src/views/modules/tooling/manuf_tool.vue @@ -1097,9 +1097,9 @@ export default { }, /*调整等待派工单的等待时间*/ - changeCurrentToolInfo(tempData) { + changeCurrentToolInfo(tempData, searchFlag) { //判断是否是新增的数据 - if(tempData.addFlag){ + if(tempData.addFlag && searchFlag){ //重置查询的条件 this.searchData.site = tempData.site; this.searchData.toolId = tempData.toolId;