From 5ed9f916ad17baf81124d1b8678779a1530c13f4 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期一, 03 三月 2025 10:17:37 +0800 Subject: [PATCH] 下单缓存问题 --- src/views/business/materialOrder/copperOrder.vue | 11 ++++++++--- src/views/business/materialOrder/customsInspection.vue | 14 +++++++++----- src/views/business/productOrder/components/add.vue | 21 +++++++++++---------- src/router/index.js | 11 ++++++----- 4 files changed, 34 insertions(+), 23 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index f6b55c0..eb196f1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -104,18 +104,19 @@ path: "customsInspection", component: () => import("@/views/business/materialOrder/customsInspection"), - name: "customsInspection", + name: "CustomsInspection", meta: { title: "鍘熸潗鏂欎笅鍗曡鎯�", activeMenu: "/business/materialOrder", + keepAlive: true }, }, { // 閾滄潗鏂欎笅鍗� path: "copperOrder", component: () => import("@/views/business/materialOrder/copperOrder"), - name: "copperOrder", - meta: { title: "閾滄潗鏂欎笅鍗�", activeMenu: "/business/materialOrder" }, + name: "CopperOrder", + meta: { title: "閾滄潗鏂欎笅鍗�", activeMenu: "/business/materialOrder",keepAlive: true }, }, ], }, @@ -131,8 +132,8 @@ path: "add", component: () => import("@/views/business/productOrder/components/add.vue"), - name: "add", - meta: { title: "鎴愬搧涓嬪崟璇︽儏", activeMenu: "/business/materialOrder" }, + name: "Add", + meta: { title: "鎴愬搧涓嬪崟璇︽儏", activeMenu: "/business/materialOrder",keepAlive: true }, }, ], }, diff --git a/src/views/business/materialOrder/copperOrder.vue b/src/views/business/materialOrder/copperOrder.vue index 47ef83b..9e264b3 100644 --- a/src/views/business/materialOrder/copperOrder.vue +++ b/src/views/business/materialOrder/copperOrder.vue @@ -421,6 +421,7 @@ } export default { + name: 'CopperOrder', components: {}, dicts: ['check_type', 'urgency_level'], data() { @@ -723,7 +724,7 @@ this.noNeedCheckLoad = false if (res.code == 201) return this.$message.success('宸叉彁浜�') - this.goBack() + this.closeOpenPage() }).catch(e=>{ this.noNeedCheckLoad = false }) @@ -1165,7 +1166,7 @@ if (res.code == 201) return this.$message.success('宸叉彁浜�') this.bsm3Dia = false; - this.goBack() + this.closeOpenPage() }).catch(e=>{ this.saveLoad = false }) @@ -1782,7 +1783,11 @@ }, goBack () { this.$router.go(-1) - } + }, + closeOpenPage() { + this.$router.go(-1) + this.$tab.closeOpenPage() + }, } } </script> diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue index 79fc1b1..939ad23 100644 --- a/src/views/business/materialOrder/customsInspection.vue +++ b/src/views/business/materialOrder/customsInspection.vue @@ -388,7 +388,7 @@ width="32%"> <span>{{ dialogMessage }}</span> <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="goBack()">纭� 瀹�</el-button> + <el-button type="primary" @click="dialogVisible= false,closeOpenPage()">纭� 瀹�</el-button> </span> </el-dialog> <el-dialog @@ -633,7 +633,7 @@ this.standardMethodListId = null } }, - mounted() { + created() { this.active = this.$route.query.active this.orderType = this.$route.query.orderType this.currentId = this.$route.query.currentId @@ -1017,7 +1017,7 @@ if (res.code == 201) return this.noNeedCheckDia = false this.$message.success('宸叉彁浜�') - this.goBack() + this.closeOpenPage() }).catch(e=>{ this.noNeedCheckLoad = false }) @@ -1069,7 +1069,7 @@ if (res.code == 201) return this.$message.success('宸叉彁浜�') this.bsm3Dia = false; - this.goBack() + this.closeOpenPage() }).catch(e=>{ this.saveLoad = false }) @@ -1833,7 +1833,11 @@ }, goBack () { this.$router.go(-1) - } + }, + closeOpenPage() { + this.$router.go(-1) + this.$tab.closeOpenPage() + }, } } </script> diff --git a/src/views/business/productOrder/components/add.vue b/src/views/business/productOrder/components/add.vue index 93e2d2c..fd462b8 100644 --- a/src/views/business/productOrder/components/add.vue +++ b/src/views/business/productOrder/components/add.vue @@ -432,7 +432,7 @@ </div> <span slot="footer" class="dialog-footer"> <el-row> - <el-button @click="issuedDialogVisible=false;goBack">鍙� 娑�</el-button> + <el-button @click="issuedDialogVisible=false;closeOpenPage">鍙� 娑�</el-button> <el-button :loading="upLoad" type="primary" @click="submitForm2">纭� 瀹�</el-button> </el-row> </span> @@ -560,6 +560,7 @@ import {selectCustomPageList} from "@/api/system/customer"; export default { + name: 'Add', components: { limsTable, cableConfig, @@ -1210,7 +1211,7 @@ this.saveLoad = false this.$message.success('宸叉彁浜�') this.bsm3Dia = false; - this.goBack() + this.closeOpenPage() }).catch(e=>{ this.saveLoad = false }) @@ -1220,7 +1221,7 @@ this.saveLoad = false this.$message.success('宸叉彁浜�') this.bsm3Dia = false; - this.goBack() + this.closeOpenPage() }).catch(e=>{ this.saveLoad = false }) @@ -1283,7 +1284,7 @@ this.$message.success('鎻愪氦鎴愬姛') this.upLoad = false this.issuedDialogVisible = false - this.goBack() + this.closeOpenPage() }).catch(e => { this.$message.error('鎻愪氦澶辫触') this.upLoad = false @@ -1921,16 +1922,12 @@ state: 2, id: this.currentId, tell: this.tell - }, { - headers: { - 'Content-Type': 'application/json' - } }).then(res => { this.noLoading = false; this.tell = ''; this.$message.success('鎻愪氦鎴愬姛') this.issuedDialogVisible = false; - this.goBack() + this.closeOpenPage() }) }, filterHandler(value, row, column) { @@ -2144,7 +2141,11 @@ }, goBack () { this.$router.go(-1) - } + }, + closeOpenPage() { + this.$router.go(-1) + this.$tab.closeOpenPage() + }, } } </script> -- Gitblit v1.9.3