123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998 |
- <?php
- $status = array
- (
- 1 => '待支付',
- 2 => '待审核',
- 3 => '待发货',
- 4 => '待收货确认',
- 5 => '已完成',
- 6 => '已完成(有退款)',
- 7 => '已取消',
- 8 => '已退款',
- 11 => '已过期',
- );
- $out_status = array
- (
- 1 => '未导出',
- 2 => '已导出',
- );
- $audit = array
- (
- //1 => '待审核',
- 2 => '审核通过',
- 3 => '审核未通过',
- );
- $refund_status = array
- (
- 1 => '未申请',
- 2 => '申请中',
- 3 => '有退款',
- 4 => '已退款',
- );
- $parent_type = array
- (
- 1 => '直接下单',
- 2 => '平台店订单',
- 3 => '代理商订单',
- );
- $excel = true;
- $type = Dever::config('base')->source;
- unset($type[3]);
- $shop = function()
- {
- $array = array
- (
- -1 => array('id' => 0, 'name' => '全部门店'),
- );
- $info = Dever::db('shop/info')->select();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $store = function()
- {
- $array = array
- (
- -1 => array('id' => 0, 'name' => '全部仓库'),
- );
- $info = Dever::db('store/info')->select();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $store_list = function()
- {
- $array = array();
- $info = Dever::db('store/info')->select();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $factory = function()
- {
- $array = array
- (
- -1 => array('id' => 0, 'name' => '全部工厂'),
- );
- $info = Dever::db('factory/info')->select();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $stype = 1;
- $noprice = 2;
- $search_option_type = Dever::input('search_option_type');
- $search_option_source_type = Dever::input('search_option_source_type');
- $struct = array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- //'list' => true,
- ),
- 'type' => array
- (
- 'type' => 'int-11',
- 'name' => '收件人类型',
- 'default' => '',
- 'desc' => '收件人类型',
- 'match' => 'is_numeric',
- 'search' => 'hidden',
- 'option' => $type,
- 'list' => false,
- 'list_order' => 3,
- ),
- 'type_id' => array
- (
- 'type' => 'int-11',
- 'name' => '收件人',
- 'default' => '',
- 'desc' => '收件人',
- 'match' => 'is_numeric',
- 'search' => 'hidden',
- 'list' => 'Dever::load("shop/lib/manage.buyInfo", "{type}", "{type_id}")',
- 'list_order' => 2,
- ),
- 'shop-info-sid'=> array
- (
- 'name' => '门店编号',
- 'default' => '',
- 'desc' => '门店编号',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('type_id', 'id'),
- 'list_order' => 1,
- ),
- 'shop-info-type'=> array
- (
- 'name' => '门店类型',
- 'default' => '',
- 'desc' => '门店类型',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('type_id', 'id'),
- 'list_order' => 3,
- ),
- 'area' => array
- (
- 'type' => 'varchar-500',
- 'name' => '所在街道',
- 'default' => '',
- 'desc' => '所在街道',
- 'match' => 'option',
- 'update' => 'linkage',
- //'list' => 'Dever::load("area/api.string", "{area}")',
- ),
- 'source_type' => array
- (
- 'type' => 'int-11',
- 'name' => '供货商类型',
- 'default' => '',
- 'desc' => '供货商类型',
- 'match' => 'is_numeric',
- 'search' => 'hidden',
- 'value' => $search_option_source_type,
- ),
- 'source_id' => array
- (
- 'type' => 'int-11',
- 'name' => '供货商',
- 'default' => '',
- 'desc' => '供货商',
- 'match' => 'is_numeric',
- 'list' => 'Dever::load("shop/lib/manage.buyInfo", "{source_type}", "{source_id}")',
- ),
- 'name' => array
- (
- 'type' => 'varchar-800',
- 'name' => '订单名称',
- 'default' => '',
- 'desc' => '订单名称',
- 'match' => 'is_string',
- 'update' => 'text',
- ),
- 'parent_type' => array
- (
- 'type' => 'int-11',
- 'name' => '原订单类型',
- 'default' => '1',
- 'desc' => '原订单类型',
- 'match' => 'is_numeric',
- 'option' => $parent_type,
- 'search' => 'hidden',
- ),
- 'parent_order_id' => array
- (
- 'type' => 'int-11',
- 'name' => '原订单id',
- 'default' => '',
- 'desc' => '原订单id',
- 'match' => 'is_numeric',
- 'search' => 'hidden',
- ),
- 'order_num' => array
- (
- 'type' => 'varchar-100',
- 'name' => '订货单号',
- 'default' => '',
- 'desc' => '订货单号',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- 'list_order' => 5,
- ),
- 'price' => array
- (
- 'type' => 'varchar-50',
- 'name' => '购买价格-采购价',
- 'default' => '0',
- 'desc' => '购买价格',
- 'match' => 'option',
- 'update' => 'text',
- 'list_name' => '订货单总金额',
- 'list_order' => 7,
- ),
- 'p_price' => array
- (
- 'type' => 'varchar-50',
- 'name' => '购买价格-出厂价,给厂家看的',
- 'default' => '0',
- 'desc' => '购买价格',
- 'match' => 'option',
- 'update' => 'text',
- 'list_name' => '订货单总金额',
- 'list_order' => 7,
- ),
- 'num' => array
- (
- 'type' => 'int-11',
- 'name' => '购买数量',
- 'default' => '',
- 'desc' => '购买数量',
- 'match' => 'is_numeric',
- 'search' => 'select',
- 'list' => true,
- 'list_name' => '订货总数量',
- 'list_order' => 6,
- ),
- 'record_cash' => array
- (
- 'type' => 'varchar-50',
- 'name' => '资金账户抵扣金额',
- 'default' => '0',
- 'desc' => '资金账户抵扣金额',
- 'match' => 'option',
- 'update' => 'text',
- 'list' => true,
- 'list_order' => 7,
- ),
- 'refund_num' => array
- (
- 'type' => 'int-11',
- 'name' => '退款数量',
- 'default' => '0',
- 'desc' => '退款数量',
- 'match' => 'is_numeric',
- ),
- 'refund_cash' => array
- (
- 'type' => 'varchar-50',
- 'name' => '退款合计金额-采购价格',
- 'default' => '0',
- 'desc' => '退款合计金额',
- 'match' => 'option',
- 'update' => 'text',
- 'list_name' => '退款金额',
- 'list_order' => 11,
- ),
- 'refund_p_cash' => array
- (
- 'type' => 'varchar-50',
- 'name' => '退款合计金额-出厂价格',
- 'default' => '0',
- 'desc' => '退款合计金额',
- 'match' => 'option',
- 'update' => 'text',
- 'list_name' => '已退商品数量',
- 'list_order' => 11,
- ),
- 'refund_status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '退款状态',
- 'default' => '1',
- 'desc' => '申请退款状态',
- 'match' => 'is_numeric',
- 'option' => $refund_status,
- //'search' => 'select',
- 'list_name' => '退款状态',
- 'list_order' => 10,
- ),
- 'info' => array
- (
- 'type' => 'varchar-300',
- 'name' => '订单备注',
- 'default' => '',
- 'desc' => '订单备注',
- 'match' => 'option',
- 'update' => 'textarea',
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '状态',
- 'match' => 'is_numeric',
- 'option' => $status,
- 'search' => 'select',
- 'list' => 'Dever::load("mshop/lib/buy.orderStatus", "{id}")',
- 'list_name' => '订货单状态',
- 'list_order' => 9,
- ),
- 'out_status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '导出状态',
- 'default' => '1',
- 'desc' => '导出状态',
- 'match' => 'is_numeric',
- 'option' => $out_status,
- ),
- 'out_date' => array
- (
- 'type' => 'int-11',
- 'name' => '导出时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- ),
- 'source_out_status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '导出状态',
- 'default' => '1',
- 'desc' => '导出状态',
- 'match' => 'is_numeric',
- 'option' => $out_status,
- ),
- 'source_out_date' => array
- (
- 'type' => 'int-11',
- 'name' => '导出时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- ),
- 'audit' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '审核状态',
- 'default' => '2',
- 'desc' => '审核状态',
- 'match' => 'is_numeric',
- 'option' => $audit,
- //'search' => 'select',
- 'update' => 'radio',
- ),
- 'audit_desc' => array
- (
- 'type' => 'varchar-500',
- 'name' => '审核备注',
- 'default' => '',
- 'desc' => '审核备注',
- 'match' => 'option',
- 'update' => 'textarea',
- ),
- 'state' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '请选择状态',
- 'match' => 'is_numeric',
- ),
- 'fdate' => array
- (
- 'type' => 'int-11',
- 'name' => '完成时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- 'search' => 'date',
- ),
- 'operdate' => array
- (
- 'type' => 'int-11',
- 'name' => '审核时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- ),
- 'fadate' => array
- (
- 'type' => 'int-11',
- 'name' => '发货日期',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- 'search' => 'date',
- 'list' => '"{fadate}" > 0 ? date("Y-m-d H:i:s", {fadate}) : "-"',
- 'list_order' => 9,
- ),
- 'shop-buy_order_ps-cdate'=> array
- (
- 'name' => '发货日期',
- 'default' => '',
- 'desc' => '发货日期',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('id', 'order_id'),
- // 'list_order' => 9,
- ),
- 'shop-buy_order_ps-ydate'=> array
- (
- 'name' => '收货日期',
- 'default' => '',
- 'desc' => '收货日期',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('id', 'order_id'),
- 'list_order' => 9,
- ),
-
- 'cdate' => array
- (
- 'type' => 'int-11',
- 'name' => '下单时间',
- 'match' => array('is_numeric', time()),
- 'desc' => '',
- # 只有insert时才生效
- 'insert' => true,
- 'search' => 'sdate',
- 'list' => 'date("Y-m-d H:i", {cdate})',
- 'list_name' => '订货日期',
- 'list_order' => 8,
- //'list' => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',
- ),
- );
- $struct['refund_p_cash']['list'] = 'Dever::load("shop/lib/manage.buyInfoRefundNum", "{id}")';
- $struct['shop-buy_order_ps-cdate']['list'] = '"{shop-buy_order_ps-cdate}" ? date("Y-m-d H:i", {shop-buy_order_ps-cdate}) : "-"';
- $button = array();
- if ($search_option_type) {
- $struct['source_id']['name'] = '供货商';
- $struct['source_id']['list_order'] = 4;
- $struct['type_id']['search'] = 'select';
- if ($search_option_type == 1) {
- # 门店采购查询
- $excel = array
- (
- array('导出订单', '门店采购订单', ''),
- array('导出订单明细', '门店采购订单明细', 'shop/excel.buy_order'),
- );
- $struct['area']['option'] = Dever::url('lib/area.get', 'shop');
- $struct['area']['search'] = 'linkage';
- $struct['refund_p_cash']['list'] = false;
- $struct['shop-buy_order_ps-cdate']['list'] = false;
- $struct['type_id']['name'] = '门店名称';
- $struct['type_id']['search'] = array
- (
- 'api' => 'shop/info-like',
- 'col' => 'name',
- 'result' => 'id',
- );
- $struct['shop-info-sid']['search'] = array
- (
- 'api' => 'shop/info-like',
- 'col' => 'sid',
- 'result' => 'id',
- 'search' => 'type_id',//本表的字段,默认为当前的字段
- );
- $struct['shop-info-sid']['list'] = true;
- $struct['shop-info-type']['list'] = 'Dever::load("shop/lib/manage.shopInfoType", {shop-info-type})';
- $struct['source_id']['search'] = array
- (
- 'api' => 'shop/lib/manage.searchFName',
- 'col' => 'name',
- 'result' => 'id',
- );
- $struct['price']['list'] = true;
- $struct['refund_cash']['list'] = true;
- $struct['refund_status']['list'] = 'Dever::load("shop/lib/manage.buyInfoRefundStatus", "{id}")';
- $struct['refund_status']['search'] = 'select';
- } elseif ($search_option_type == 2) {
- $excel = array
- (
- array('导出订单', '仓库入库订单', ''),
- array('导出订单明细', '仓库入库订单明细', 'shop/excel.store_buy_order'),
- );
- $search_table = 'store';
- $struct['type_id']['name'] = '仓库名称';
- $struct['type_id']['option'] = $store;
- $struct['shop-buy_order_ps-ydate']['list'] = '"{shop-buy_order_ps-ydate}" ? date("Y-m-d H:i", {shop-buy_order_ps-ydate}) : "-"';
- $struct['source_type']['search'] = 'select';
- $struct['source_type']['option'] = array(2 => '仓库', 3 => '工厂');
- $struct['source_id']['search'] = array
- (
- 'api' => 'shop/lib/manage.searchFName',
- 'col' => 'name',
- 'result' => 'id',
- );
- $noprice = 1;
- } elseif ($search_option_type == 3) {
- $struct['refund_p_cash']['list'] = false;
- $struct['type_id']['option'] = $factory;
- }
- }
- if ($search_option_source_type) {
- $struct['source_id']['name'] = '供货商';
- $struct['source_id']['list_order'] = -1;
- if ($search_option_source_type == 2) {
- $noprice = 1;
- if ($search_option_type == 2) {
- $button = array
- (
- '新建库存调拨单' => array('location', 'store/lib/manage.cashier'),
- );
- $struct['source_id']['name'] = '发货仓库';
- $struct['source_id']['search'] = 'select';
- $struct['source_id']['option'] = $store_list;
- $struct['type_id']['name'] = '收货仓库';
- $struct['type_id']['search'] = 'select';
- $struct['type_id']['option'] = $store_list;
- $excel = array
- (
- array('导出订单', '仓库调拨订单', ''),
- array('导出订单明细', '仓库调拨订单明细', 'shop/excel.store_buy_order_diao'),
- );
- } else {
- $struct['source_id']['name'] = '仓库名称';
- $struct['source_id']['search'] = 'select';
- $struct['source_id']['option'] = $store;
- $excel = array
- (
- array('导出订单', '仓库发货订单', ''),
- array('导出订单明细', '仓库发货订单明细', 'shop/excel.store_buy_order_fa'),
- );
- $struct['refund_status']['search'] = 'select';
- }
- } elseif ($search_option_source_type == 3) {
- $struct['type']['search'] = 'select';
- $struct['type']['list'] = true;
- $struct['source_id']['name'] = '工厂名称';
- $struct['source_id']['search'] = 'select';
- $struct['source_id']['option'] = $factory;
- $struct['type_id']['name'] = '收件人名称';
- $struct['type_id']['search'] = array
- (
- 'api' => 'shop/lib/manage.searchName',
- 'col' => 'name',
- 'result' => 'id',
- );
- $struct['source_id']['list_order'] = -1;
- $struct['p_price']['list'] = true;
- $struct['type_id']['option'] = $factory;
- $excel = array
- (
- array('导出订单', '工厂发货订单', ''),
- array('导出订单明细', '工厂发货订单明细', 'shop/excel.factory_buy_order_fa'),
- );
- if ($search_option_type == 2) {
- $struct['type']['list'] = false;
- $struct['type']['search'] = 'hidden';
- $struct['source_type']['search'] = 'hidden';
- $struct['type_id']['name'] = '仓库名称';
- $struct['type_id']['search'] = 'select';
- $struct['type_id']['option'] = $store;
- $button = array
- (
- '新建平台订货单' => array('location', 'factory/lib/manage.cashier'),
- );
- }
- }
- }
- $config = array
- (
- # 表名
- 'name' => 'buy_order',
- # 显示给用户看的名称
- 'lang' => '采购订单',
- 'order' => 99,
- 'status' => $status,
- 'refund_status' => $refund_status,
- 'config_type' => $type,
- 'out_status' => $out_status,
- 'end' => array
- (
- 'insert' => 'shop/lib/manage.buyOrderUpdate',
- 'update' => 'shop/lib/manage.buyOrderUpdate',
- ),
- # 数据结构
- 'struct' => $struct,
- 'manage' => array
- (
- 'list_table' => 'html',
- 'delete' => false,
- 'edit' => false,
- 'insert' => false,
- 'excel' => $excel,
- 'button' => $button,
- 'list_button' => array(
- //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin', '{status} == 2'),
- //'delete' => array('删除', '', '{status} == 1'),
- 'list' => array('查看详情', '"buy_order_goods&project=shop&order_id={id}&page_type=1&type='.$stype.'&noprice='.$noprice.'"'),
- //'oper' => array('审核', '"mshop/lib/manage.audit?order_id={id}"', '{status} == 2'),
- //'fast' => array('自动审核', '"buy_order&where_id={id}&col=audit,audit_desc&oper_save_jump=buy_order&oper_table=buy_order&oper_parent=buy_order"', '{status} == 2'),
- 'list1' => array('审核', '"buy_order_goods&project=shop&order_id={id}&audit=1&page_type=1&type='.$stype.'&noprice='.$noprice.'"', '{status} == 2'),
- //'oper1' => array('发货', '"mshop/lib/manage.send?order_id={id}"', '{status} == 3'),
- //'fast1' => array('发货', '"buy_order_ps&where_id={id}&search_option_order_id={id}&oper_save_jump=buy_order&oper_table=buy_order&oper_parent=buy_order"', '{status} == 3'),
- ),
- ),
- 'alter' => array
- (
- 2 => array
- (
- array('update', 'parent_order_id', 'parent_order_id', 'int-11 0 原订单id'),
- ),
- 3 => array
- (
- array('update', 'refund_num', 'refund_num', 'float-11,2 0 退款数量'),
- array('update', 'num', 'num', 'float-11,2 0 购买数量'),
- ),
- 'version' => 3,
- ),
- 'request' => array
- (
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'name' => array('yes', 'like'),
- 'order_num' => array('yes', 'like'),
- 'type' => 'yes',
- 'type_id' => 'yes',
- 'source_type' => 'yes',
- 'source_id' => 'yes',
- 'parent_type' => array('yes', 'in'),
- 'out_status' => 'yes',
- 'source_out_status' => 'yes',
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'start_o' => array('yes-operdate', '>='),
- 'end_o' => array('yes-operdate', '<='),
- 'start_f' => array('yes-fdate', '>='),
- 'end_f' => array('yes-fdate', '<='),
- 'status' => array('yes', 'in'),
- 'refund_status' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'page' => array(20, 'list'),
- 'col' => '*',
- ),
- 'getData' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'name' => array('yes', 'like'),
- 'order_num' => array('yes', 'like'),
- 'type' => 'yes',
- 'type_id' => 'yes',
- 'source_type' => 'yes',
- 'source_id' => 'yes',
- 'parent_type' => array('yes', 'in'),
- 'out_status' => 'yes',
- 'source_out_status' => 'yes',
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'start_o' => array('yes-operdate', '>='),
- 'end_o' => array('yes-operdate', '<='),
- 'start_f' => array('yes-fdate', '>='),
- 'end_f' => array('yes-fdate', '<='),
- 'status' => array('yes', 'in'),
- 'refund_status' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'col' => '*',
- ),
- # 获取订单数量
- 'getOrderNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'start_o' => array('yes-operdate', '>='),
- 'end_o' => array('yes-operdate', '<='),
- 'type' => 'yes',
- 'type_id' => 'yes',
- 'source_type' => 'yes',
- 'source_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'count',
- 'col' => '*',
- ),
- # 获取总金额
- 'getCashNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'start_o' => array('yes-operdate', '>='),
- 'end_o' => array('yes-operdate', '<='),
- 'type' => 'yes',
- 'type_id' => 'yes',
- 'source_type' => 'yes',
- 'source_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(price+record_cash) as total',
- ),
- # 获取总金额
- 'getPCashNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'start_o' => array('yes-operdate', '>='),
- 'end_o' => array('yes-operdate', '<='),
- 'type' => 'yes',
- 'type_id' => 'yes',
- 'source_type' => 'yes',
- 'source_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(p_price) as total',
- ),
- # 获取商品数量
- 'getGoodsNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'start_o' => array('yes-operdate', '>='),
- 'end_o' => array('yes-operdate', '<='),
- 'type' => 'yes',
- 'type_id' => 'yes',
- 'source_type' => 'yes',
- 'source_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(num-refund_num) as total',
- ),
- # 获取提交订单超过12个小时
- 'getDataByTime' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'cdate' => array('yes', '<='),
- 'status' => 'yes',
- 'notice' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'col' => '*',
- ),
- # 获取商品数量
- 'getGoodsTotal' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'type' => 'yes',
- 'type_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(num-refund_num) as total',
- ),
- 'getDataToId' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'type' => 'yes',
- 'type_id' => 'yes',
- 'source_type' => 'yes',
- 'source_id' => 'yes',
- 'parent_type' => array('yes', 'in'),
- 'parent_order_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'col' => '*|id',
- ),
- # 按月结算区域利润
- 'getArea' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '>='),
- 'area' => array('yes', 'like'),
- 'type' => 1,
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'col' => '*',
- ),
- # 区域查询
- 'getSerachMoney' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-fdate', '>='),
- 'end' => array('yes-fdate', '<='),
- 'area' => array('yes', 'like'),
- 'type' => 1,
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(price) as total',
- ),
- 'getSerachTMoney' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-fdate', '>='),
- 'end' => array('yes-fdate', '<='),
- 'area' => array('yes', 'like'),
- 'type' => 1,
- 'type_id' => array('yes','in'),
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(price) as total',
- ),
- 'getNewAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-fdate', '>='),
- 'end' => array('yes-fdate', '<='),
- 'area' => array('yes', 'like'),
- 'type' => 1,
- 'type_id' => array('yes', 'in'),
- 'status' => array('yes', 'in'),
- 'state' => 1,
- 'parent_type' => array('yes','in'),
- ),
- 'type' => 'all',
- 'col' => '*',
- ),
- ),
- );
- $search_option_parent_order_id = Dever::input('search_option_parent_order_id');
- if ($search_option_parent_order_id) {
- $config['search'] = false;
- }
- return $config;
|