diff --git a/src/views/modules/brand/config/popup/change-password.vue b/src/views/modules/brand/config/popup/change-password.vue index 8e71c81..85fb772 100644 --- a/src/views/modules/brand/config/popup/change-password.vue +++ b/src/views/modules/brand/config/popup/change-password.vue @@ -125,7 +125,7 @@ export default { }, }, { - label: this.isAdd ? "确认添加" : "确认", + label: this.isAdd ? "保存" : "确认", type: "primary", loading: this.isLoading, submit: true, diff --git a/src/views/modules/product/index.vue b/src/views/modules/product/index.vue index 3e4ff20..34490b7 100644 --- a/src/views/modules/product/index.vue +++ b/src/views/modules/product/index.vue @@ -26,7 +26,7 @@ @@ -34,6 +34,7 @@ 查询 + 重置 @@ -88,9 +89,10 @@ export default { activeName: "在售", dataList: [], formInline: { - user: "", - region: "", + name: "", + marketId: "", }, + marketList: [], tableProp: { "auto-resize": true, border: true, @@ -104,7 +106,18 @@ export default { }; }, created() { - this.shopId = JSON.parse(sessionStorage.getItem("userInfo")).shopId; + if (JSON.parse(sessionStorage.getItem("userInfo")).markets.length > 0) { + this.shopId = true; + this.formInline.marketId = JSON.parse( + sessionStorage.getItem("userInfo") + ).markets[0].marketId; + this.marketList = JSON.parse(sessionStorage.getItem("userInfo")).markets; + console.log(this.marketList); + } else if (JSON.parse(sessionStorage.getItem("userInfo")).shopId) { + this.shopId = true; + } else { + this.shopId = false; + } }, methods: { addProduct() { @@ -140,6 +153,7 @@ export default { pageNumber: pageNo, pageSize: pageSize, }, + ...this.formInline, productFilterType: this.productFilterType, merchantId: JSON.parse(sessionStorage.getItem("userInfo")).merchantId, shopId: JSON.parse(sessionStorage.getItem("userInfo")).shopId, @@ -156,6 +170,13 @@ export default { this.$refs.oTable.complete(false); }); }, + Reset() { + this.formInline = { + name: "", + // region: "", + }; + this.$refs.oTable.reload(); + }, handleClick() { switch (this.activeName) { case "在售":