This commit is contained in:
mkm 2024-05-18 16:43:56 +08:00
parent e57fc9cc84
commit 3417e462fb
3 changed files with 18 additions and 7 deletions

View File

@ -102,10 +102,9 @@ class OpurchaseclassController extends BaseAdminController
if($find){
$item['goods_name'] = $find['name'];
$item['unit_name'] = $find['unit_name'];
$goodslabel = GoodsLabel::where('id','in',$item['sys_labels'])->column('id,name');
if($goodslabel){
$item['sys_labels_arr'] = implode(',',$goodslabel);
}
$goodslabel = GoodsLabel::where('id','in',$find['sys_labels'])->column('id,name');
$item['sys_labels_arr'] = $goodslabel;
}
});

View File

@ -19,6 +19,8 @@ use app\common\model\supplier\Supplier;
class OpurchaseclassofferLists extends BaseAdminDataLists implements ListsSearchInterface
{
protected $where;
/**
* @notes 设置搜索条件
@ -46,6 +48,16 @@ class OpurchaseclassofferLists extends BaseAdminDataLists implements ListsSearch
public function lists(): array
{
$where=[];
$is_mer=$this->request->get('is_mer',0);
$id=$this->request->get('id',0);
if($is_mer==2){
$arr=Opurchaseclass::where('id',$id)->value('order_arr');
if($arr){
$arr=explode(',',$arr);
$where[]=['order_id','in',$arr];
}
}
$this->where=$where;
return OpurchaseGoodsOffer::where($this->searchWhere)
->where($where)
->limit($this->limitOffset, $this->limitLength)
@ -69,7 +81,7 @@ class OpurchaseclassofferLists extends BaseAdminDataLists implements ListsSearch
*/
public function count(): int
{
return OpurchaseGoodsOffer::where($this->searchWhere)->count();
return OpurchaseGoodsOffer::where($this->searchWhere)->where($this->where)->count();
}
}

View File

@ -138,9 +138,9 @@ class OrderLogic extends BaseLogic
}
$mer_id = $user['merchant']['mer_id'];
$where1 = ['paid' => 1,'is_opurchase'=>0];
$where1 = ['pay_type','<>',9];
$arrs = Cashierclass::where('merchant', $mer_id)->whereDay('create_time')->where($where1)->column('cart_id,id,address_id');
$where1[] = ['pay_type','<>',9];
$arrs = Cashierclass::where('merchant', $mer_id)->whereDay('create_time')->where($where1)->column('cart_id,id,address_id');
// $order_id = Cashierclass::where('merchant', $mer_id)->whereDay('create_time')->where($where1)->column('id');
$cart_arr = [];
$order_id = [];