修改预订单录入
This commit is contained in:
parent
ffb57636ef
commit
17cc47ffc9
@ -154,9 +154,9 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
|
|||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
})?->toArray();
|
})?->toArray();
|
||||||
// if ($userShip > 0 && $userShip != 4) {
|
if ($userShip > 0 && $userShip != 4) {
|
||||||
// $list = StoreProductGroupPrice::resetProductsPrice($list, $userShip);
|
$list = StoreProductGroupPrice::resetStoreProductsPrice($list, $userShip, $this->params['store_id'] ?? 0);
|
||||||
// }
|
}
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ class StoreProductLogic extends BaseLogic
|
|||||||
if ($userShip == 4) {
|
if ($userShip == 4) {
|
||||||
$data['price'] = $data['cost'];
|
$data['price'] = $data['cost'];
|
||||||
} else {
|
} else {
|
||||||
$data = StoreProductGroupPrice::resetProductPrice($data, $userShip);
|
$data = StoreProductGroupPrice::resetStoreProductPrice($data, $userShip, $params['store_id'] ?? 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($data['is_show']==1){
|
if($data['is_show']==1){
|
||||||
|
@ -42,9 +42,9 @@ class StoreProductGroupPrice extends BaseModel
|
|||||||
return $product;
|
return $product;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function resetStoreProductsPrice($productList, $userShip, $shopId)
|
public static function resetStoreProductsPrice($productList, $userShip, $storeId)
|
||||||
{
|
{
|
||||||
if ($shopId > 0 && SystemStore::isSelfOperate($shopId) && $userShip > 0) {
|
if ($storeId > 0 && SystemStore::isSelfOperate($storeId) && $userShip > 0) {
|
||||||
foreach ($productList as &$item) {
|
foreach ($productList as &$item) {
|
||||||
$item['price'] = $item['vip_price'] > 0 ? $item['vip_price'] : $item['price'];
|
$item['price'] = $item['vip_price'] > 0 ? $item['vip_price'] : $item['price'];
|
||||||
}
|
}
|
||||||
@ -54,9 +54,9 @@ class StoreProductGroupPrice extends BaseModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function resetStoreProductPrice($product, $userShip, $shopId)
|
public static function resetStoreProductPrice($product, $userShip, $storeId)
|
||||||
{
|
{
|
||||||
if ($shopId > 0 && SystemStore::isSelfOperate($shopId) && $userShip > 0) {
|
if ($storeId > 0 && SystemStore::isSelfOperate($storeId) && $userShip > 0) {
|
||||||
$product['price'] = $product['vip_price'] > 0 ? $product['vip_price'] : $product['price'];
|
$product['price'] = $product['vip_price'] > 0 ? $product['vip_price'] : $product['price'];
|
||||||
return $product;
|
return $product;
|
||||||
} else {
|
} else {
|
||||||
|
@ -150,4 +150,14 @@ class ConfigController extends BaseAdminController
|
|||||||
return $this->success('ok', $list);
|
return $this->success('ok', $list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 根据类型获取字典数据
|
||||||
|
*/
|
||||||
|
public function dict()
|
||||||
|
{
|
||||||
|
$type = $this->request->get('type', '');
|
||||||
|
$data = ConfigLogic::getDictByType($type);
|
||||||
|
return $this->data($data);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -315,12 +315,16 @@ class BeforehandOrderController extends BaseAdminController
|
|||||||
|
|
||||||
public function productLists()
|
public function productLists()
|
||||||
{
|
{
|
||||||
|
$params = $this->request->get();
|
||||||
|
$params['store_id'] = $this->request->adminInfo['store_id'] ?? 0;
|
||||||
|
$this->request->setGet($params);
|
||||||
return $this->dataLists(new StoreProductLists());
|
return $this->dataLists(new StoreProductLists());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function productDetail()
|
public function productDetail()
|
||||||
{
|
{
|
||||||
$params = (new StoreProductValidate())->goCheck('detail');
|
$params = (new StoreProductValidate())->goCheck('detail');
|
||||||
|
$params['store_id'] = $this->request->adminInfo['store_id'] ?? 0;
|
||||||
$result = StoreProductLogic::detail($params);
|
$result = StoreProductLogic::detail($params);
|
||||||
return $this->data($result);
|
return $this->data($result);
|
||||||
}
|
}
|
||||||
|
@ -146,6 +146,9 @@ class StoreProductController extends BaseAdminController
|
|||||||
*/
|
*/
|
||||||
public function adminLists()
|
public function adminLists()
|
||||||
{
|
{
|
||||||
|
$params = $this->request->get();
|
||||||
|
$params['store_id'] = $this->request->adminInfo['store_id'] ?? 0;
|
||||||
|
$this->request->setGet($params);
|
||||||
return $this->dataLists(new StoreProductLists());
|
return $this->dataLists(new StoreProductLists());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user