123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <?php
- $status = array
- (
- 1 => '未对账',
- 2 => '已对账',
- );
- $type = array
- (
- 1 => '按月对账',
- 2 => '按周对账',
- 3 => '按天对账',
- );
- $shop = function()
- {
- $array = array();
- $info = Dever::db('shop/info')->state();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- return array
- (
- # 表名
- 'name' => 'shop_sell',
- # 显示给用户看的名称
- 'lang' => '门店零售对账单',
- 'order' => 89,
- '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}")',
- ),
- 'shop_id' => array
- (
- 'type' => 'int-11',
- 'name' => '对账门店',
- 'default' => '',
- 'desc' => '对账门店',
- 'match' => 'is_numeric',
- 'search' => 'select',
- 'option' => $shop,
- 'update' => 'hidden',
- 'value' => Dever::input('search_option_shop_id'),
- 'list' => 'Dever::load("shop/info-one#name", {shop_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,
- ),
- 'shop_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=shop_sell"'),
- 'oper' => array('确认对账金额', '"cash/lib/set.audit?id={id}&type=shop_sell"', '{status} == 1', 'Dever::load("cash/lib/set.statYes", "{id}", "shop_sell")', '请确认'),
- ),
- ),
- 'request' => array
- (
- # 获取总金额
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-day', '>='),
- 'end' => array('yes-day', '<='),
- 'shop_id' => 'yes',
- 'status' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('day'=>'desc','id' => 'desc'),
- 'page' => array(10, 'list'),
- 'col' => '*',
- ),
- ),
- );
|