diff --git a/src/views/data/index.vue b/src/views/data/index.vue index 464b92b..889c5cd 100644 --- a/src/views/data/index.vue +++ b/src/views/data/index.vue @@ -709,11 +709,12 @@ export default { */ async geiShopList() { try { - let shopInfo = JSON.parse(localStorage.getItem('userInfo')) - if (shopInfo.isHeadShop) { + if (this.shopInfo.isHeadShop) { let res = await ShopApi.getBranchList() this.branchList = res; this.shopId = res[0].shopId + } else { + this.shopId = this.shopInfo.id } } catch (error) { console.log('获取分店列表===', error); diff --git a/src/views/data/sales.vue b/src/views/data/sales.vue index 7e8a77b..d840b63 100644 --- a/src/views/data/sales.vue +++ b/src/views/data/sales.vue @@ -255,15 +255,12 @@ export default { * 获取分店列表 */ async geiShopList() { - try { - let shopInfo = JSON.parse(localStorage.getItem('userInfo')) - if (shopInfo.isHeadShop) { - let res = await ShopApi.getBranchList() - this.branchList = res; - this.shopId = res[0].shopId - } - } catch (error) { - console.log('获取分店列表===', error); + if (this.shopInfo.isHeadShop) { + let res = await ShopApi.getBranchList() + this.branchList = res; + this.shopId = res[0].shopId + } else { + this.shopId = this.shopInfo.id } }, totalfilter(item, d) { diff --git a/src/views/data/table.vue b/src/views/data/table.vue index 9c281cb..4af4868 100644 --- a/src/views/data/table.vue +++ b/src/views/data/table.vue @@ -158,15 +158,12 @@ export default { * 获取分店列表 */ async geiShopList() { - try { - let shopInfo = JSON.parse(localStorage.getItem('userInfo')) - if (shopInfo.isHeadShop) { - let res = await ShopApi.getBranchList() - this.branchList = res; - this.shopId = res[0].shopId - } - } catch (error) { - console.log('获取分店列表===', error); + if (this.shopInfo.isHeadShop) { + let res = await ShopApi.getBranchList() + this.branchList = res; + this.shopId = res[0].shopId + } else { + this.shopId = this.shopInfo.id } }, //携带table id跳转到订单列表页面 diff --git a/src/views/tool/table/index.vue b/src/views/tool/table/index.vue index 3994342..833360e 100644 --- a/src/views/tool/table/index.vue +++ b/src/views/tool/table/index.vue @@ -347,14 +347,14 @@ async function areainit() { } async function diancanShow(item, key) { if (!key) { - router.push({ path: "/tool/index", query: { tableCode: item.tableCode } }); + router.push({ path: "/Instead", query: { tableCode: item.tableCode } }); return; } if (key == "isAddGoods") { - router.push({ path: "/tool/index", query: { id: item.orderId, key } }); + router.push({ path: "/Instead", query: { id: item.orderId, key } }); } if (key == "isPayOrder") { - router.push({ path: "/tool/index", query: { id: item.orderId, key } }); + router.push({ path: "/Instead", query: { id: item.orderId, key } }); } } const tabClick = (tab) => {