From 957f8ba187229b9ba55cfb877f92095aa344ebfc Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Fri, 21 Jun 2024 14:11:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StoreBranchProductAttrValue.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/common/model/store_branch_product_attr_value/StoreBranchProductAttrValue.php b/app/common/model/store_branch_product_attr_value/StoreBranchProductAttrValue.php index 31e3e6f99..bd44c55e6 100644 --- a/app/common/model/store_branch_product_attr_value/StoreBranchProductAttrValue.php +++ b/app/common/model/store_branch_product_attr_value/StoreBranchProductAttrValue.php @@ -4,6 +4,7 @@ namespace app\common\model\store_branch_product_attr_value; use app\common\model\BaseModel; +use app\common\model\store_branch_product\StoreBranchProduct; use app\common\model\store_product_attr_value\StoreProductAttrValue; use think\model\concern\SoftDelete; @@ -21,7 +22,7 @@ class StoreBranchProductAttrValue extends BaseModel public function attr() { - return $this->hasOne(StoreProductAttrValue::class, 'unique', 'unique')->bind(['image']); + return $this->hasOne(StoreBranchProduct::class, 'product_id', 'product_id')->bind(['image']); } } From 76c1a2fdff373fee12cf5ac2f45c8fdbdf985991 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Fri, 21 Jun 2024 14:17:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store_product_attr_value/StoreProductAttrValueLists.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/store/lists/store_product_attr_value/StoreProductAttrValueLists.php b/app/store/lists/store_product_attr_value/StoreProductAttrValueLists.php index e93380f40..debd853da 100644 --- a/app/store/lists/store_product_attr_value/StoreProductAttrValueLists.php +++ b/app/store/lists/store_product_attr_value/StoreProductAttrValueLists.php @@ -43,7 +43,9 @@ class StoreProductAttrValueLists extends BaseAdminDataLists implements ListsSear public function lists(): array { return StoreBranchProductAttrValue::with('attr')->where($this->searchWhere) - ->field(['id', 'product_id', 'stock', 'unique', 'sales', 'bar_code']) + ->field(['id', 'product_id', 'stock', 'unique', 'sales', 'bar_code', + 'price', 'vip_price', 'cost', 'purchase', + ]) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() From 51330f86fd5d0401baef525ef778835a53d3b98b Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Fri, 21 Jun 2024 14:39:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/store/lists/store_product/StoreProductLists.php | 2 +- .../store_product_attr_value/StoreProductAttrValueLists.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/store/lists/store_product/StoreProductLists.php b/app/store/lists/store_product/StoreProductLists.php index d436fa4d9..64ab5c6e1 100644 --- a/app/store/lists/store_product/StoreProductLists.php +++ b/app/store/lists/store_product/StoreProductLists.php @@ -46,7 +46,7 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa { return StoreBranchProduct::where($this->searchWhere) ->where('store_id', $this->adminInfo['store_id']) - ->field(['id', 'image', 'store_name', 'cate_id', 'price', 'sales', 'stock', 'is_show', 'unit', 'cost','rose','purchase']) + ->field(['id', 'image', 'store_name', 'cate_id', 'price', 'sales', 'stock', 'is_show', 'unit', 'cost','rose','purchase', 'vip_price']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function ($item) { diff --git a/app/store/lists/store_product_attr_value/StoreProductAttrValueLists.php b/app/store/lists/store_product_attr_value/StoreProductAttrValueLists.php index debd853da..b30469d01 100644 --- a/app/store/lists/store_product_attr_value/StoreProductAttrValueLists.php +++ b/app/store/lists/store_product_attr_value/StoreProductAttrValueLists.php @@ -43,8 +43,7 @@ class StoreProductAttrValueLists extends BaseAdminDataLists implements ListsSear public function lists(): array { return StoreBranchProductAttrValue::with('attr')->where($this->searchWhere) - ->field(['id', 'product_id', 'stock', 'unique', 'sales', 'bar_code', - 'price', 'vip_price', 'cost', 'purchase', + ->field(['id', 'product_id', 'stock', 'unique', 'sales', 'bar_code' ]) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc'])