From 18cfc3426a5f9da51b38f0c001002f8c241ab3ae Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Sat, 11 May 2024 18:35:16 +0800 Subject: [PATCH] add --- src/api/goods.ts | 5 + src/components/goodsPop/index.vue | 136 +++++++++++++++++++++ src/views/data/merchant/merchant/index.vue | 12 +- src/views/goods/goods/edit.vue | 45 +++++++ 4 files changed, 197 insertions(+), 1 deletion(-) create mode 100644 src/components/goodsPop/index.vue diff --git a/src/api/goods.ts b/src/api/goods.ts index 2d2a3e8..4228af1 100644 --- a/src/api/goods.ts +++ b/src/api/goods.ts @@ -23,4 +23,9 @@ export function apiGoodsDelete(params: any) { // 商品表详情 export function apiGoodsDetail(params: any) { return request.get({ url: '/goods/goods/detail', params }) +} + +// 商品绑定 +export function apiBindGodds(params: any) { + return request.post({ url: '/merchat/merchant/bind_goods', params }) } \ No newline at end of file diff --git a/src/components/goodsPop/index.vue b/src/components/goodsPop/index.vue new file mode 100644 index 0000000..b71e723 --- /dev/null +++ b/src/components/goodsPop/index.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 确认绑定 + 取消 + + + + + + + diff --git a/src/views/data/merchant/merchant/index.vue b/src/views/data/merchant/merchant/index.vue index 3d2bd05..2eef5b9 100644 --- a/src/views/data/merchant/merchant/index.vue +++ b/src/views/data/merchant/merchant/index.vue @@ -147,6 +147,9 @@ 详情 + + 商品绑定 + @@ -158,13 +161,16 @@ + + + diff --git a/src/views/goods/goods/edit.vue b/src/views/goods/goods/edit.vue index 5eb5a30..78f4455 100644 --- a/src/views/goods/goods/edit.vue +++ b/src/views/goods/goods/edit.vue @@ -225,6 +225,36 @@ const formRules = reactive({ trigger: ["blur"], }, ], + spec: [ + { + required: true, + message: "请输入规格型号", + trigger: ["blur"], + }, + ], + sys_labels: [ + { + required: true, + message: "请选择标签", + trigger: ["blur"], + }, + ], + buy: [ + { + required: true, + message: "请输入购货价格", + trigger: ["blur"], + }, + ], + + stocktip: [ + { + required: true, + message: "请输入库存阈值", + trigger: ["blur"], + }, + ], + py: [ { required: true, @@ -239,6 +269,21 @@ const formRules = reactive({ trigger: ["blur"], }, ], + warehouse: [ + { + required: true, + message: "请输入库存阈值", + trigger: ["blur"], + }, + ], + imgs: [ + { + required: true, + message: "请上传商品图片", + trigger: ["blur"], + }, + ], + // brand: [ // { // required: true,