['name', 'number', 'contacts', 'tel', 'customer_type', 'dept_type', 'related_suppliers', 'invoice_type'], ]; } /** * @notes 获取客户管理列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/04/23 14:44 */ public function lists(): array { return Customer::where($this->searchWhere) ->field(['id', 'name', 'number', 'contacts', 'tel', 'customer_type', 'dept_type', 'related_suppliers', 'invoice_type']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() ->toArray(); } /** * @notes 获取客户管理数量 * @return int * @author likeadmin * @date 2024/04/23 14:44 */ public function count(): int { return Customer::where($this->searchWhere)->count(); } }