| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace app\admin\controller\qingdong\customer;
- use app\admin\controller\qingdong\Base;
- use think\Db;
- use think\Exception;
- /**
- * 合同跟进记录管理
- * 操作文档:https://doc.fastadmin.net/qingdong
- * 软件介绍:https://www.fastadmin.net/store/qingdong.html
- * 售后微信:qingdong_crm
- */
- class Cusrecord extends Base {
- protected $relationSearch = true;
- /**
- * @var \addons\qingdong\model\Contract
- */
- protected $model = null;
- public function _initialize() {
- parent::_initialize();
- $this->model = new \addons\qingdong\model\Record();
- }
- /**
- * 查看
- */
- public function index() {
- //设置过滤方法
- if ($this->request->isAjax()) {
- $params = $this->request->get();
- list($where, $sort, $order, $offset, $limit) = $this->buildparams();
- $wheres = [];
- $wheres['relation_id'] = $params['ids'];
- $list = $this->model->with(['file'])->where($where)->where($wheres)
- ->order($sort, $order)->paginate($limit);
- $data = $list->items();
- //// foreach($data as &$v){
- //// $contract_remark='';
- //// $contract_other = $v['contract_other'];
- //// $otherdata = json_decode($contract_other['otherdata'],true);
- //// if(is_array($otherdata)){
- //// if(isset($otherdata['other_upnhey'])){
- //// $contract_remark = $otherdata['other_upnhey'];
- //// }
- //// if(isset($otherdata['other_zdywys'])){
- //// $contract_remark = $otherdata['other_zdywys'];
- //// }
- //// }
- //// $v['contract_remark'] = $contract_remark;
- ////// outFileLog($contract_remark,'cus_contract','$v');
- // }
- outFileLog($data,'custecord','record_index');
- $result = array("total" => $list->total(), "rows" => $list->items());
- return json($result);
- }
- return $this->view->fetch();
- }
- }
|