123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433 |
- <?php
- $pay_account = function()
- {
- $array = array
- (
- -1 => '其他',
- );
- $info = Dever::db('pay/account')->select();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $method = array
- (
- 1 => '自提',
- 2 => '外送',
- );
- $status = array
- (
- 1 => '待支付',
- 2 => '待处理',
- 3 => '处理中',
- 4 => '待收货确认',
- 5 => '已完成',
- 6 => '已完成(有退款)',
- 7 => '已取消',
- 8 => '已退款',
- 11 => '已过期',
- );
- $seller = function()
- {
- $array = array();
- $info = Dever::db('role/sell')->select();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- return array
- (
- # 表名
- 'name' => 'sell',
- # 显示给用户看的名称
- 'lang' => '销售订单',
- 'order' => 100,
- 'set' => array
- (
- 'status' => $status,
- 'method' => $method,
- ),
-
- 'ends' => array
- (
- 'insert' => 'shop/lib/manage.sellOrderUpdate',
- 'update' => 'shop/lib/manage.sellOrderUpdate',
- 'updatemul' => 'shop/lib/manage.setSellOrderStatusMul_commit',
- ),
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- //'list' => true,
- ),
- 'order_num' => array
- (
- 'type' => 'varchar-100',
- 'name' => '订单号',
- 'default' => '',
- 'desc' => '订单号',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list_name' => '订单信息',
- 'list' => 'Dever::load("order/lib/sell.info#order", {id})',
- ),
- 'seller_id' => array
- (
- 'type' => 'int-11',
- 'name' => '销售商',
- 'default' => '',
- 'desc' => '销售商',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- 'search' => array
- (
- 'api' => 'role/seller-like',
- 'col' => 'name',
- 'result' => 'id',
- ),
- 'value' => Dever::input('search_option_seller_id'),
- ),
- 'uid' => array
- (
- 'type' => 'int-11',
- 'name' => '购买人',
- 'default' => '0',
- 'desc' => '购买人',
- 'match' => 'is_numeric',
- 'update' => 'text',
- 'search' => array
- (
- 'api' => 'passport/user-like',
- 'col' => 'username',
- 'result' => 'id',
- ),
- ),
- 'address' => array
- (
- 'type' => 'varchar-2000',
- 'name' => '收货信息',
- 'default' => '',
- 'desc' => '收货信息',
- 'match' => 'is_numeric',
- 'search' => 'fulltext',
- 'list' => 'Dever::load("order/lib/sell.info#address", {id})',
- ),
- 'num' => array
- (
- 'type' => 'int-11',
- 'name' => '购买总数量',
- 'default' => '',
- 'desc' => '购买总数量',
- 'match' => 'is_numeric',
- 'list_name' => '金额信息',
- 'list' => 'Dever::load("order/lib/sell.info#cash", {id})',
- ),
- 'cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '订单总金额',
- 'default' => '0',
- 'desc' => '订单总金额',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'pay_account' => array
- (
- 'type' => 'int-11',
- 'name' => '支付账号',
- 'default' => '1',
- 'desc' => '支付账号',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- ),
- 'pay_cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '支付金额',
- 'default' => '0',
- 'desc' => '支付金额',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'ps_cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '配送费',
- 'default' => '0',
- 'desc' => '配送费',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'card_id' => array
- (
- 'type' => 'int-11',
- 'name' => '用户的礼品卡id',
- 'default' => '',
- 'desc' => '礼品卡id',
- 'match' => 'option',
- ),
- 'card_cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '礼品卡抵扣金额',
- 'default' => '0',
- 'desc' => '礼品卡抵扣金额',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'wallet_cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '钱包抵扣金额',
- 'default' => '0',
- 'desc' => '钱包抵扣金额',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'coupon_id' => array
- (
- 'type' => 'int-11',
- 'name' => '用户的优惠券id',
- 'default' => '',
- 'desc' => '用户的优惠券id',
- 'match' => 'option',
- ),
- 'coupon_cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '优惠金额',
- 'default' => '0',
- 'desc' => '优惠金额',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'discount_id' => array
- (
- 'type' => 'int-11',
- 'name' => '折扣ID',
- 'default' => '',
- 'desc' => '折扣ID',
- 'match' => 'option',
- ),
- 'discount_cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '折扣优惠金额',
- 'default' => '0',
- 'desc' => '折扣优惠金额',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'method' => array
- (
- 'type' => 'int-11',
- 'name' => '配送类型',
- 'default' => '1',
- 'desc' => '配送类型',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $method,
- ),
- 'code' => array
- (
- 'type' => 'varchar-100',
- 'name' => '自提码或者核销码',
- 'default' => '',
- 'desc' => '自提码或者核销码',
- 'match' => 'is_numeric',
- ),
- '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',
- //'search_after' => '<br />',
- //'mul' => true,
- //'mul_option' => array(2 => '批量审核', 5 => '确认收货'),
- ),
- 'pay_date' => array
- (
- 'type' => 'int-11',
- 'name' => '付款时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- 'list' => '"{paydate}" > 0 ? date("Y-m-d H:i", {paydate}) : "-"',
- ),
- 'finish_date' => array
- (
- 'type' => 'int-11',
- 'name' => '完成时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- 'search' => 'date',
- 'list' => '"{finish_date}" ? date("Y-m-d H:i", {finish_date}) : "-"',
- ),
- 'oper_date' => array
- (
- 'type' => 'int-11',
- 'name' => '审核时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- //'list' => '"{operdate}" > 0 ? date("Y-m-d H:i:s", {operdate}) : "-"',
- //'list_name' => '发货时间',
- //'list_order' => 8,
- ),
- 'fa_date' => array
- (
- 'type' => 'int-11',
- 'name' => '发货时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- 'search' => 'date',
- 'list' => '"{fa_date}" > 0 ? date("Y-m-d H:i:s", {fa_date}) : "-"',
- ),
- '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' => 'sdate',
- 'list' => 'date("Y-m-d H:i", {cdate})',
- ),
- ),
- 'manage' => array
- (
- 'delete' => false,
- 'edit' => false,
- 'insert' => false,
- //'excel' => $excel,
- //'mul' => $mul,
- 'button' => array
- (
- //'导出订单明细' => array('excel', 'shop/excel.sell_order'),
- ),
- 'list_button' => array
- (
- //fast_list
- /*
- 'list' => array('查看详情', '"sell_order_goods&project=shop&order_id={id}&page_type=&search_option_shop_type='.$search_option_shop_type.'"'),
- 'list11' => array('查看采购单', '"buy_order&project=shop&search_option_type=1&&search_option_parent_type=2&search_option_parent_order_id={id}&oper_table=sell_order&search_option_shop_type='.$search_option_shop_type.'"', '{status} >= 3 && {audit} == 2 && {shop_type} == 2'),
- 'list1' => array('审核', '"sell_order_goods&project=shop&order_id={id}&audit=1&page_type=&search_option_shop_type='.$search_option_shop_type.'"', '{status} == 2 && {shop_type} == 2'),
- 'oper' => array('确认收货', '"shop/lib/manage.setSellOrderStatus?shop_id={shop_id}&order_id={id}"', '{status} == 4 && {shop_type} == 2'),
- */
- ),
- ),
- 'request' => array
- (
- 'getList' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'shop_id' => 'yes',
- 'uid' => 'yes',
- 'status' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'page' => array(5, 'list'),
- 'col' => '*',
- ),
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'uid' => 'yes',
- 'name' => array('yes', 'like'),
- 'shop_id' => 'yes',
- 'mobile' => 'yes',
- 'method' => 'yes',
- 'pay_method' => 'yes',
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'page' => array(10, 'list'),
- 'col' => '*',
- ),
- ),
- );
|