| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423 | <?php$status = array(    1 => '待签署',    2 => '有效',    3 => '作废',);$mid = Dever::input('search_option_mid');$button = array();if ($mid) {    $button = array    (        '返回上一页' => array('location', 'l=project/database/list&project=agent&table=member_area&page_type=1&mid=' . $mid),    );}return array(    # 表名    'name' => 'member_agreement',    # 显示给用户看的名称    'lang' => '合同管理',    'order' => 10,    'status' => $status,    # 数据结构    'struct' => array    (            'id'        => array        (            'type'      => 'int-11',            'name'      => 'ID',            'default'   => '',            'desc'      => '',            'match'     => 'is_numeric',            'search'    => 'order',            //'list'        => true,        ),        'mid'      => array        (            'type'      => 'int-11',            'name'      => '手机号',            'default'   => '-1',            'desc'      => '代理商',            'match'     => 'is_string',            'update'    => 'text',            /*            'search'    => $mid ? 'hidden' : array            (                'api' => 'agent/member-select',                'col' => 'mobile',                'result' => 'id',            ),*/            //'list_name' => '手机号',            'list'      => 'Dever::load("agent/lib/member.getOne", {mid})',            'list_order' => 1,            //'list_order' => 2,        ),        'agent-member-name'=> array        (            'name'      => '姓名',            'default'   => '',            'desc'      => '姓名',            'match'     => 'option',            # 读取另外表的关联方式            'sync'      => array('mid', 'id'),            //'list'      => $mid ? false : true,            //'list_order' => 1,        ),        'agent-member-role'=> array        (            'name'      => '代理角色',            'default'   => '',            'desc'      => '代理角色',            'match'     => 'option',            # 读取另外表的关联方式            'sync'      => array('mid', 'id'),            //'list'      => 'Dever::load("setting/role-find#name", "{agent-member-role}")',            //'list_order' => 3,        ),        'order_num'      => array        (            'type'      => 'varchar-100',            'name'      => '合同编号',            'default'   => '',            'desc'      => '合同编号',            'match'     => 'is_string',            'update'    => 'text',        ),        'order_id'      => array        (            'type'      => 'int-11',            'name'      => '关联订单表id',            'default'   => '',            'desc'      => '关联订单表id',            'match'     => 'is_numeric',        ),        'agreement_id'      => array        (            'type'      => 'int-11',            'name'      => '合同模板id',            'default'   => '',            'desc'      => '合同模板id',            'match'     => 'is_numeric',        ),        'agreement_name'      => array        (            'type'      => 'varchar-500',            'name'      => '合同名称',            'default'   => '',            'desc'      => '合同名称',            'match'     => 'is_string',            'update'    => 'text',            'search'    => 'fulltext',            'list'      => true,            'list_order' => 6,        ),        'type'        => array        (            'type'      => 'tinyint-1',            'name'      => '类型',            'default'   => '1',            'desc'      => '类型',            'match'     => 'is_numeric',        ),        'sign'     => array        (            'type'      => 'varchar-150',            'name'      => '合同签名',            'default'   => '',            'desc'      => '合同签名',            'match'     => 'option',            'update'    => 'image',            'key'       => '7',            'list'      => '"<img src=\'{sign}\' width=\'150\'>"',            'list_order' => 7,        ),        'name'      => array        (            'type'      => 'varchar-100',            'name'      => '姓名',            'default'   => '',            'desc'      => '姓名',            'match'     => 'is_string',            'update'    => 'text',        ),        'mobile'      => array        (            'type'      => 'bigint-11',            'name'      => '手机号',            'default'   => '',            'desc'      => '请输入手机号',            'match'     => Dever::rule('mobile'),            'update'    => 'text',            'search'    => $mid ? 'hidden' : 'fulltext',            //'list'      => $mid ? false : true,            //'list_order' => 2,        ),        'role'      => array        (            'type'      => 'int-11',            'name'      => '代理角色',            'default'   => '',            'desc'      => '代理角色',            'match'     => 'is_numeric',        ),		'price'      => array        (            'type'      => 'float-11,2',            'name'      => '实付金额',            'default'   => '0',            'desc'      => '金额',            'match'     => 'option',            'update'    => 'text',        ),        'area'       => array        (            'type'      => 'varchar-500',            'name'      => '区域',            'default'   => '',            'desc'      => '区域',            'match'     => 'option',        ),        'idcard'      => array        (            'type'      => 'varchar-32',            'name'      => '身份证号码',            'default'   => '',            'desc'      => '身份证号码',            'match'     => 'is_string',            'update'    => 'text',        ),        'idcard_front'     => array        (            'type'      => 'varchar-150',            'name'      => '身份证正面',            'default'   => '',            'desc'      => '身份证正面',            'match'     => 'option',            'update'    => 'image',            'key'       => '8',            'place'     => '660*660',        ),        'idcard_back'     => array        (            'type'      => 'varchar-150',            'name'      => '身份证背面',            'default'   => '',            'desc'      => '身份证背面',            'match'     => 'option',            'update'    => 'image',            'key'       => '8',            'place'     => '660*660',        ),        'company_name'      => array        (            'type'      => 'varchar-100',            'name'      => '公司名称',            'default'   => '',            'desc'      => '公司名称',            'match'     => 'is_string',            'update'    => 'text',            //'search'    => 'fulltext',            //'list'      => true,        ),        'company_pic'      => array        (            'type'      => 'varchar-150',            'name'      => '营业执照',            'default'   => '',            'desc'      => '营业执照',            'match'     => 'option',            'update'    => 'image',            'key'       => '8',            'place'     => '660*660',        ),        'company_number'      => array        (            'type'      => 'varchar-80',            'name'      => '营业执照号码',            'default'   => '',            'desc'      => '营业执照号码',            'match'     => 'is_string',            'update'    => 'text',        ),        'address'      => array        (            'type'      => 'varchar-800',            'name'      => '地址',            'default'   => '',            'desc'      => '地址',            'match'     => 'is_string',            'update'    => 'text',        ),        'qdate'     => array        (            'type'      => 'int-11',            'name'      => '协议签订时间',            'match'     => 'is_numeric',            'desc'      => '协议签订时间',            'update'    => 'text',        ),        'sdate'     => array        (            'type'      => 'int-11',            'name'      => '有效期开始时间',            'match'     => 'is_numeric',            'desc'      => '有效期开始时间',            'update'    => 'text',        ),        'edate'     => array        (            'type'      => 'int-11',            'name'      => '有效期结束时间',            'match'     => 'is_numeric',            'desc'      => '有效期结束时间',            'update'    => 'text',        ),        'udate'     => array        (            'type'      => 'int-11',            'name'      => '更新时间',            'match'     => 'is_numeric',            'desc'      => '更新时间',            'search'    => 'date',            'list'      => 'date("Y-m-d H:i", {udate})',            'list_order' => 5,        ),        'status'        => array        (            'type'      => 'tinyint-1',            'name'      => '合同状态',            'default'   => '1',            'desc'      => '合同状态',            'match'     => 'is_numeric',            'option'    => $status,            'search'    => 'select',            'list'      => true,            'list_order' => 8,        ),        'state'     => array        (            'type'      => 'tinyint-1',            'name'      => '状态',            'default'   => '1',            'desc'      => '请选择状态',            'match'     => 'is_numeric',        ),                'cdate'     => array        (            'type'      => 'int-11',            'name'      => '创建时间',            'match'     => array('is_numeric', time()),            'desc'      => '',            # 只有insert时才生效            'insert'    => true,            //'search'    => 'date',            'list'      => 'date("Y-m-d H:i", {cdate})',            'list_order' => 4,        ),    ),    'manage' => array    (        'insert' => false,        'delete' => false,        'edit' => false,        'button' => $button,        'list_button' => array        (            'new' => array('查看', '"lib/agreement.location?id={id}"', 'agent'),        ),    ),    'request' => array    (        'getData' => array        (            # 匹配的正则或函数 选填项            'option' => array            (                'mid' => 'yes',                'order_id' => 'yes',                'agreement_id' => 'yes',                'state' => 1,            ),            'type' => 'all',            'order' => array('id' => 'desc'),            'col' => '*',        ),        'getOld' => array        (            # 匹配的正则或函数 选填项            'option' => array            (                'mid' => 'yes',                'order_id' => 'yes',                'agreement_id' => 'yes',                'state' => 1,            ),            'type' => 'one',            'order' => array('id' => 'desc'),            'col' => '*',        ),        'getOne' => array        (            # 匹配的正则或函数 选填项            'option' => array            (                'mid' => 'yes',                'type' => 'yes',                'state' => 1,            ),            'type' => 'one',            'order' => array('id' => 'desc'),            'col' => '*',        ),        'getAll' => array        (            # 匹配的正则或函数 选填项            'option' => array            (                'mid' => 'yes',                'state' => 1,            ),            'type' => 'all',            'order' => array('id' => 'desc'),            'page' => array(10, 'list'),            'col' => 'id,mid,agreement_id,status,qdate,role,name,area,agreement_name',        ),    ),);
 |