diff --git a/src/views/modules/logistics-fare/logistics-template/index.vue b/src/views/modules/logistics-fare/logistics-template/index.vue index e9844d5..44bd972 100644 --- a/src/views/modules/logistics-fare/logistics-template/index.vue +++ b/src/views/modules/logistics-fare/logistics-template/index.vue @@ -67,10 +67,20 @@ export default { }; }, created() { - this.searchForm = { - name: "", - linkId: this.marketId ? this.marketId : this.shopId, - }; + if ( + JSON.parse(sessionStorage.getItem("userInfo")).role === "ROLE_MERCHANT" + ) { + this.searchForm = { + name: "", + linkId: this.shopId, + }; + } else { + this.searchForm = { + name: "", + linkId: this.marketId ? this.marketId : this.shopId, + }; + } + this.$nextTick(() => { this.$refs.oTable.reload(); }); @@ -95,10 +105,19 @@ export default { }); }, Reset() { - this.searchForm = { - name: "", - linkId: this.marketId ? this.marketId : this.shopId, - }; + if ( + JSON.parse(sessionStorage.getItem("userInfo")).role === "ROLE_MERCHANT" + ) { + this.searchForm = { + name: "", + linkId: this.shopId, + }; + } else { + this.searchForm = { + name: "", + linkId: this.marketId ? this.marketId : this.shopId, + }; + } this.$refs.oTable.reload(); }, addFareTemplate() {