quanwei
2025-12-05 feda780069d64479c0c20493603717e100655da9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
 
namespace app\agent\controller;
 
use app\agent\model\Contract as ContractModel;
 
class Contract extends Controller
{
    /*
     *获取客户合同
    */
    public function get_contract()
    {
        $model = new ContractModel;
        $contract = $model->getList($this->postData());
        //$contract = $contract['contract'];
        return $this->renderSuccess('', compact('contract'));
    }
    /*
     *上传客户合同
    */
    public function add_contract()
    {
        $model = new ContractModel;
        // 新增记录
        if ($model->add($this->postData())) {
            return $this->renderSuccess('添加成功');
        }
        return $this->renderError($model->getError() ?: '添加失败');
    }
}