['is_adopt'], ]; } /** * @notes 获取采购供应链商户报价列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/04/27 11:26 */ public function lists(): array { $where=[]; return OpurchaseGoodsOffer::where($this->searchWhere) ->where($where) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function ($item) { $find = Goods::where('id', $item['goods_id'])->with('unitName')->find(); $item['goods_name'] = $find['name']; $item['unit_name'] = $find['unit_name']; $item['supplier_name'] = Supplier::where('id',$item['supplier_id'])->value('mer_name'); })->toArray(); } /** * @notes 获取采购供应链商户报价数量 * @return int * @author likeadmin * @date 2024/04/27 11:26 */ public function count(): int { return OpurchaseGoodsOffer::where($this->searchWhere)->count(); } }