判断经营者
continuous-integration/drone/push Build is passing Details

This commit is contained in:
余同学 2024-11-11 18:05:56 +08:00
parent b95c767c98
commit e5c74c2e0c
2 changed files with 26 additions and 5 deletions

View File

@ -125,7 +125,7 @@ export default {
},
},
{
label: this.isAdd ? "确认添加" : "确认",
label: this.isAdd ? "保存" : "确认",
type: "primary",
loading: this.isLoading,
submit: true,

View File

@ -26,7 +26,7 @@
</el-form-item>
<el-form-item label="商品搜索">
<el-input
v-model="formInline.user"
v-model="formInline.name"
placeholder="商品搜索"
></el-input>
</el-form-item>
@ -34,6 +34,7 @@
<el-button type="primary" @click="$refs.oTable.reload()"
>查询</el-button
>
<el-button type="primary" @click="Reset">重置</el-button>
</el-form-item>
</el-form>
<el-tabs v-model="activeName" @tab-click="handleClick">
@ -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 "在售":