['customer_id', 'contacts', 'create_user'], ]; } /** * @notes 获取报价单列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2023/11/27 17:23 */ public function lists(): array { return Quotation::where($this->searchWhere) ->with('product') ->field(['id', 'customer_id', 'quotation_date', 'contacts', 'contacts_phone', 'create_user', 'invoice_type', 'amount_including_tax', 'freight', 'other_fee', 'total_amount']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取报价单数量 * @return int * @author likeadmin * @date 2023/11/27 17:23 */ public function count(): int { return Quotation::where($this->searchWhere)->count(); } }