判断经营者
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", type: "primary",
loading: this.isLoading, loading: this.isLoading,
submit: true, submit: true,

View File

@ -26,7 +26,7 @@
</el-form-item> </el-form-item>
<el-form-item label="商品搜索"> <el-form-item label="商品搜索">
<el-input <el-input
v-model="formInline.user" v-model="formInline.name"
placeholder="商品搜索" placeholder="商品搜索"
></el-input> ></el-input>
</el-form-item> </el-form-item>
@ -34,6 +34,7 @@
<el-button type="primary" @click="$refs.oTable.reload()" <el-button type="primary" @click="$refs.oTable.reload()"
>查询</el-button >查询</el-button
> >
<el-button type="primary" @click="Reset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
@ -88,9 +89,10 @@ export default {
activeName: "在售", activeName: "在售",
dataList: [], dataList: [],
formInline: { formInline: {
user: "", name: "",
region: "", marketId: "",
}, },
marketList: [],
tableProp: { tableProp: {
"auto-resize": true, "auto-resize": true,
border: true, border: true,
@ -104,7 +106,18 @@ export default {
}; };
}, },
created() { 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: { methods: {
addProduct() { addProduct() {
@ -140,6 +153,7 @@ export default {
pageNumber: pageNo, pageNumber: pageNo,
pageSize: pageSize, pageSize: pageSize,
}, },
...this.formInline,
productFilterType: this.productFilterType, productFilterType: this.productFilterType,
merchantId: JSON.parse(sessionStorage.getItem("userInfo")).merchantId, merchantId: JSON.parse(sessionStorage.getItem("userInfo")).merchantId,
shopId: JSON.parse(sessionStorage.getItem("userInfo")).shopId, shopId: JSON.parse(sessionStorage.getItem("userInfo")).shopId,
@ -156,6 +170,13 @@ export default {
this.$refs.oTable.complete(false); this.$refs.oTable.complete(false);
}); });
}, },
Reset() {
this.formInline = {
name: "",
// region: "",
};
this.$refs.oTable.reload();
},
handleClick() { handleClick() {
switch (this.activeName) { switch (this.activeName) {
case "在售": case "在售":