diff --git a/src/api/shop/goods.ts b/src/api/shop/goods.ts index b26c8bf..85446b2 100644 --- a/src/api/shop/goods.ts +++ b/src/api/shop/goods.ts @@ -1,12 +1,19 @@ import { http } from "@/utils/http"; export interface GoodsQuery extends BasePageQuery { + /** 商品名称 */ goodsName?: string; categoryId?: number; + /** 商品状态(0下架 1上架) */ status?: number; + /** 商品ID */ goodsId?: number; + /** 自动审批开关(0关闭 1开启) */ autoApproval?: number; + /** 所属类型(0智借还 1固资通) */ belongType?: number; + /** 企业微信ID */ + corpid: string; } /** 商品DTO */ @@ -17,6 +24,8 @@ export interface GoodsDTO { goodsName: string; /** 商品分类ID */ categoryId: number; + /** 企业微信ID */ + corpid: string; /** 商品价格 */ price: number; /** 库存数量 */ @@ -68,6 +77,8 @@ export interface GoodsRequest { remark?: string; /** 商品使用说明 */ usageInstruction?: string; + /** 企业微信ID */ + corpid: string; } /** 获取商品列表 */ diff --git a/src/api/shop/shop.ts b/src/api/shop/shop.ts index c2c655b..3959675 100644 --- a/src/api/shop/shop.ts +++ b/src/api/shop/shop.ts @@ -3,21 +3,25 @@ import { http } from '@/utils/http'; /** 商店分页查询参数 */ export interface ShopQuery extends BasePageQuery { shopName?: string; + corpid?: string; } /** 商店DTO */ export interface ShopDTO { shopId: number; shopName: string; + corpid?: string; } /** 新增商店命令 */ export interface AddShopCommand { shopName: string; + corpid: string; } /** 更新商店命令 */ export interface UpdateShopCommand { + corpid: string; shopId: number; shopName: string; } diff --git a/src/views/cabinet/shop/index.vue b/src/views/cabinet/shop/index.vue index f49756c..cda170e 100644 --- a/src/views/cabinet/shop/index.vue +++ b/src/views/cabinet/shop/index.vue @@ -13,11 +13,13 @@ import { ElMessage, ElMessageBox } from "element-plus"; import ShopFormModal from "./shop-form-modal.vue"; import ReQrcode from "@/components/ReQrcode"; import { copyTextToClipboard } from "@pureadmin/utils"; +import { useWxStore } from "@/store/modules/wx"; defineOptions({ name: "Shop" }); +const wxStore = useWxStore(); const formRef = ref(); const tableRef = ref(); const modalVisible = ref(false); @@ -28,6 +30,7 @@ const handleRefresh = () => { }; const searchFormParams = ref({ + corpid: wxStore.corpid, shopName: "" }); @@ -48,6 +51,7 @@ const getList = async () => { loading.value = true; const { data } = await getShopList({ ...searchFormParams.value, + corpid: wxStore.corpid, pageSize: pagination.value.pageSize, pageNum: pagination.value.currentPage }); diff --git a/src/views/cabinet/shop/shop-form-modal.vue b/src/views/cabinet/shop/shop-form-modal.vue index aad9270..c2c2fd0 100644 --- a/src/views/cabinet/shop/shop-form-modal.vue +++ b/src/views/cabinet/shop/shop-form-modal.vue @@ -1,7 +1,8 @@