| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 | <?php$status = array(    1 => '未对账',    2 => '已对账',);$type = Dever::db('cash/shop')->config['config_type'];$factory = function(){    $array = array();    $info = Dever::db('factory/info')->state();    if($info)    {        $array += $info;    }    return $array;};return array(    # 表名    'name' => 'factory',    # 显示给用户看的名称    'lang' => '工厂对账单',    'order' => 70,    'config_status' => $status,    'config_type' => $type,    # 数据结构    'struct' => array    (            'id'        => array        (            'type'      => 'int-11',            'name'      => 'ID',            'default'   => '',            'desc'      => '',            'match'     => 'is_numeric',            'search'    => 'order',            //'list'      => true,        ),        'type'        => array        (            'type'      => 'tinyint-1',            'name'      => '对账单类型',            'default'   => '1',            'desc'      => '对账单类型',            'match'     => 'is_numeric',        ),        'day'     => array        (            'type'      => 'int-11',            'name'      => '对账单时间',            'default'   => '',            'match'     => 'is_numeric',            'desc'      => '',            'search'    => 'day',            'order'     => 'desc',            'list'      => 'Dever::load("cash/lib/set.statDate", "{type}", "{day}")',        ),        'factory_id'      => array        (            'type'      => 'int-11',            'name'      => '对账工厂',            'default'   => '',            'desc'      => '对账工厂',            'match'     => 'is_numeric',            'search'    => 'select',            'option'    => $factory,            'update'    => 'hidden',            'value'     => Dever::input('search_option_factory_id'),            'list'      => 'Dever::load("factory/info-one#name", {factory_id})',        ),        'start'     => array        (            'type'      => 'int-11',            'name'      => '对账单开始时间',            'default'   => '',            'match'     => 'is_numeric',            'desc'      => '',        ),        'end'     => array        (            'type'      => 'int-11',            'name'      => '对账单结束时间',            'default'   => '',            'match'     => 'is_numeric',            'desc'      => '',            'list_name' => '对账周期',            'list'      => 'Dever::load("cash/lib/set.statTime", "{start}", "{end}")',        ),        'cash'      => array        (            'type'      => 'varchar-100',            'name'      => '对账金额',            'default'   => '0',            'desc'      => '对账金额',            'match'     => 'option',            'update'    => 'text',            'list'      => 'Dever::load("cash/lib/set.getCash", "{cash}")',        ),        'num'      => array        (            'type'      => 'varchar-100',            'name'      => '对账数量',            'default'   => '0',            'desc'      => '对账数量',            'match'     => 'option',            'update'    => 'text',            //'list'        => true,        ),        'factory_status'        => array        (            'type'      => 'int-11',            'name'      => '工厂对账状态',            'default'   => '1',            'desc'      => '工厂对账状态',            'match'     => 'is_numeric',            'update'    => 'radio',            'search'    => 'select',            'option'    => $status,            'list'      => true,        ),        'status'        => array        (            'type'      => 'int-11',            'name'      => '平台对账状态',            'default'   => '1',            'desc'      => '平台对账状态',            'match'     => 'is_numeric',            'update'    => 'radio',            'search'    => 'select',            'option'    => $status,            'list'      => true,        ),        '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:s", {cdate})',            //'list'      => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',        ),    ),    'manage' => array    (        'delete' => false,        'edit' => false,        'insert' => false,        'excel' => true,        'list_button' => array(            'list' => array('查看详情', '"order&project=cash&id={id}&page_type=1&type=factory"'),            'oper'  => array('确认对账金额', '"cash/lib/set.audit?id={id}&type=factory"', '{status} == 1', 'Dever::load("cash/lib/set.statYes", "{id}", "factory")', '请确认'),        ),    ),    'request' => array    (        # 获取总金额        'getAll' => array        (            # 匹配的正则或函数 选填项            'option' => array            (                'start' => array('yes-day', '>='),                'end' => array('yes-day', '<='),                'factory_id' => 'yes',                'factory_status' => 'yes',                'status' => 'yes',                'state' => 1,            ),            'type' => 'all',            'page' => array(10, 'list'),            'col' => '*',        ),    ),);
 |