12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064 |
- <?php
- $pay_status = Dever::config('base', 'pay')->pay['status'];
- $method = array
- (
- 1 => '自提',
- 2 => '外送',
- );
- $pay_method = array
- (
- 1 => '平台结算',
- 2 => '门店代下单',
- 3 => '礼品卡',
- );
- $audit = array
- (
- //1 => '待审核',
- 2 => '审核通过',
- 3 => '审核未通过',
- );
- $pay_type = array
- (
- 1 => '微信',
- 2 => '现金',
- );
- $status = array
- (
- 1 => '待支付',
- 2 => '待处理',
- 3 => '处理中',
- 4 => '待收货确认',
- 5 => '已完成',
- 6 => '已完成(有退款)',
- 7 => '已取消',
- 8 => '已取消',//已退款
- 11 => '已取消',//已过期
- );
- $status_manage = array
- (
- 1 => '待支付',
- 2 => '待处理',
- 3 => '处理中',
- 4 => '待收货确认',
- 5 => '已完成',
- 6 => '已完成(有退款)',
- 7 => '已取消',
- 8 => '已退款',//已退款
- 11 => '已过期',//已过期
- );
- //1待支付2支付成功3处理中4待确认5已完成6已完成(有退款)7已取消8已退款11已过期
- $refund_status = array
- (
- 1 => '未申请',
- 2 => '申请中',
- 3 => '有退款',
- 4 => '已退款',
- );
- $shop = function()
- {
- $array = array();
- $info = Dever::db('shop/info')->select();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $store = function()
- {
- $array = array();
- $info = Dever::db('store/info')->select();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $withdraw = array
- (
- 1 => '未提现',
- 2 => '已提现',
- );
- $shop_type = array
- (
- 1 => '普通店',
- 2 => '平台店',
- );
- $search_option_shop_type = Dever::input('search_option_shop_type', 1);
- if ($search_option_shop_type == 1) {
- $excel = array
- (
- array('导出订单', '门店零售订单', ''),
- array('导出订单明细', '门店零售订单明细', 'shop/excel.sell_order'),
- );
- $refund_search = false;
- } elseif ($search_option_shop_type == 2) {
- $excel = array
- (
- array('导出订单', '平台商城订单', ''),
- array('导出订单明细', '平台商城订单明细', 'shop/excel.p_sell_order'),
- );
- $refund_search = 'select';
- }
- $mul = false;
- if (Dever::load('manage/auth')->checkFunc('menu_61.menu_85', 'piliangfafang', '批量收货')) {
- $mul = '({status} == 4 || {status} == 2) && {shop_type} == 2';
- } elseif (Dever::load('manage/auth')->checkFunc('menu_61.menu_218', 'piliangfafang', '批量收货')) {
- $mul = '({status} == 4 || {status} == 2) && {shop_type} == 2';
- }
- return array
- (
- # 表名
- 'name' => 'sell_order',
- # 显示给用户看的名称
- 'lang' => '销售订单',
- 'order' => 100,
- 'status' => $status,
- 'status_manage' => $status_manage,
- 'pay_method' => $pay_method,
- 'pay_type' => $pay_type,
- 'method' => $method,
- 'end' => 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,
- ),
- 'shop-info-sid'=> array
- (
- 'name' => '门店编号',
- 'default' => '',
- 'desc' => '门店编号',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('shop_id', 'id'),
- 'list' => $search_option_shop_type == 1 ? true : false,
- 'list_order' => 1,
- ),
- 'shop_id' => array
- (
- 'type' => 'int-11',
- 'name' => '门店名称',
- 'default' => '',
- 'desc' => '门店名称',
- 'match' => 'is_numeric',
- 'search' => 'select',
- 'option' => $shop,
- 'update' => 'hidden',
- 'search' => 'hidden',
- 'search' => $search_option_shop_type == 1 ? array
- (
- 'api' => 'shop/info-like',
- 'col' => 'name',
- 'result' => 'id',
- ) : 'hidden',
- 'value' => Dever::input('search_option_shop_id'),
- 'list' => $search_option_shop_type == 1 ? 'Dever::load("shop/info-one#name", {shop_id})' : false,
- 'list_order' => 2,
- ),
- 'store_id' => array
- (
- 'type' => 'int-11',
- 'name' => '发货仓库-废弃',
- 'default' => '',
- 'desc' => '发货仓库',
- 'match' => 'is_numeric',
- 'option' => $store,
- 'update' => 'select',
- 'searchs' => $search_option_shop_type == 2 ? array
- (
- 'api' => 'store/info-like',
- 'col' => 'name',
- 'result' => 'id',
- ) : 'hidden',
- //'list' => $search_option_shop_type == 2 ? '"{store_id}" > 0 ? Dever::load("store/info-one#name", {store_id}) : ""' : false,
- 'list_order' => 6,
- ),
- 'shop-info-type'=> array
- (
- 'name' => '门店类型',
- 'default' => '',
- 'desc' => '门店类型',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('shop_id', 'id'),
- 'list' => $search_option_shop_type == 1 ? 'Dever::load("shop/lib/manage.shopInfoType", {shop-info-type})' : false,
- 'list_order' => 3,
- ),
- 'area' => array
- (
- 'type' => 'varchar-500',
- 'name' => '所在街道',
- 'default' => '',
- 'desc' => '所在街道',
- 'match' => 'option',
- 'search' => $search_option_shop_type == 1 ? 'linkage' : false,
- 'update' => 'linkage',
- 'option' => Dever::url('lib/area.get', 'shop'),
- //'list' => 'Dever::load("area/api.string", "{area}")',
- ),
- 'uid' => array
- (
- 'type' => 'int-11',
- 'name' => $search_option_shop_type == 1 ? '购买人' : '收件人',
- 'default' => '0',
- 'desc' => '请选择用户',
- 'match' => 'is_numeric',
- 'update' => 'text',
- //'search' => 'select',
- 'search' => $search_option_shop_type == 1 ? array
- (
- 'api' => 'passport/user-one',
- 'col' => 'username',
- 'result' => 'id',
- ) : array
- (
- 'api' => 'passport/address-all',
- 'col' => 'contact',
- 'result' => 'id',//返回的字段
- 'search' => 'address_id',//本表的字段,默认为当前的字段
- ),
- 'list' => $search_option_shop_type == 1 ? 'Dever::load("shop/lib/manage.user", {id})' : 'Dever::load("passport/address-one#contact", {address_id})',
- 'list_order' => 5,
- ),
- 'mobile' => array
- (
- 'type' => 'varchar-300',
- 'name' => $search_option_shop_type == 1 ? '下单手机号' : '收件人手机',
- 'default' => '',
- 'desc' => '手机号',
- 'match' => 'option',
- 'search' => 'fulltext',
-
- 'search' => $search_option_shop_type == 1 ? 'fulltext' : array
- (
- 'api' => 'passport/address-all',//接口地址,最好是获取多条数据的地址
- 'col' => 'mobile',//要查询的字段
- 'result' => 'id',//返回的字段
- 'search' => 'address_id',//本表的字段,默认为当前的字段
- ),
- 'list' => $search_option_shop_type == 1 ? false : 'Dever::load("passport/address-one#mobile", {address_id})',
- 'list_order' => 6,
- ),
- 'address_id' => array
- (
- 'type' => 'int-11',
- 'name' => $search_option_shop_type == 1 ? false : '商品信息',#'送货地址',
- 'default' => '',
- 'desc' => '送货地址',
- 'match' => 'is_numeric',
- 'list' => $search_option_shop_type == 1 ? false : 'Dever::load("shop/lib/manage.goods_list",{id})',
- //'list' => 'Dever::load("passport/address-find#address", {address_id})';
- ),
- 'invoice_id' => array
- (
- 'type' => 'int-11',
- 'name' => '发票信息',
- 'default' => '',
- 'desc' => '发票信息',
- 'match' => 'is_numeric',
- //'list' => 'Dever::load("passport/address-find#address", {address_id})';
- ),
- 'name' => array
- (
- 'type' => 'varchar-800',
- 'name' => '订单名称',
- 'default' => '',
- 'desc' => '订单名称',
- 'match' => 'is_string',
- 'update' => 'text',
- ),
- 'order_num' => array
- (
- 'type' => 'varchar-100',
- 'name' => '订单号',
- 'default' => '',
- 'desc' => '订单号',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- 'list_order' => 4,
- ),
- 'oprice' => array
- (
- 'type' => 'varchar-50',
- 'name' => '原价',
- 'default' => '0',
- 'desc' => '原价',
- 'match' => 'option',
- 'update' => 'text',
- 'list_name' => '合计金额',
- //'list' => $search_option_shop_type == 1 ? 'Dever::load("shop/lib/manage.getTotalCash", {id})' : false,
- 'list' => 'Dever::load("shop/lib/manage.getTotalCash", {id})',
- 'list_order' => 10,
- ),
- 'price' => array
- (
- 'type' => 'varchar-50',
- //'name' => $search_option_shop_type == 1 ? '实付金额' : '订单总金额',
- 'name' => '实付金额',
- 'default' => '0',
- 'desc' => '实付金额',
- 'match' => 'option',
- 'update' => 'text',
- 'list' => 'Dever::load("cash/lib/set.getCash", "{price}")',
- 'list_order' => 11,
- ),
- 'num' => array
- (
- 'type' => 'int-11',
- 'name' => '购买总数量',
- 'default' => '',
- 'desc' => '购买总数量',
- 'match' => 'is_numeric',
- 'search' => 'select',
- 'list' => $search_option_shop_type == 2 ? true : false,
- 'list_order' => 10,
- ),
- 'refund_num' => array
- (
- 'type' => 'int-11',
- 'name' => '退款数量',
- 'default' => '0',
- 'desc' => '退款数量',
- 'match' => 'is_numeric',
- ),
- 'refund_cash' => array
- (
- 'type' => 'varchar-50',
- 'name' => $search_option_shop_type == 1 ? '已退订单金额' : '退款金额',
- 'default' => '0',
- 'desc' => '已退订单金额',
- 'match' => 'option',
- 'update' => 'text',
- 'list' => true,
- 'list_order' => $search_option_shop_type == 1 ? 12 : 19,
- ),
- 'refund_status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '退款状态',
- 'default' => '1',
- 'desc' => '申请退款状态',
- 'match' => 'is_numeric',
- 'option' => $refund_status,
- 'search' => $refund_search,
- 'list' => $search_option_shop_type == 2 ? 'Dever::load("shop/lib/manage.buyInfoRefundStatus", "{id}", "sell_order")' : false,
- 'list_name' => '退款状态',
- 'list_order' => 18,
- ),
- 'kou_cash' => array
- (
- 'type' => 'varchar-50',
- 'name' => '抹零金额',
- 'default' => '0',
- 'desc' => '抹零金额',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'ps_cash' => array
- (
- 'type' => 'varchar-50',
- 'name' => '配送费',
- 'default' => '0',
- 'desc' => '配送费',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'card_code_id' => array
- (
- 'type' => 'int-11',
- 'name' => '礼品卡id',
- 'default' => '',
- 'desc' => '礼品卡id',
- 'match' => 'option',
- ),
- 'card_code_card' => array
- (
- 'type' => 'varchar-800',
- 'name' => '礼品卡卡号',
- 'default' => '',
- 'desc' => '礼品卡卡号',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'card_code_cash' => array
- (
- 'type' => 'varchar-50',
- 'name' => '礼品卡抵扣金额',
- 'default' => '0',
- 'desc' => '礼品卡抵扣金额',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'wallet_cash' => array
- (
- 'type' => 'varchar-50',
- 'name' => '钱包抵扣金额',
- 'default' => '0',
- 'desc' => '钱包抵扣金额',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'coupon_id' => array
- (
- 'type' => 'int-11',
- 'name' => '门店的优惠券id',
- 'default' => '',
- 'desc' => '门店的优惠券id',
- 'match' => 'option',
- ),
- 'user_coupon_id' => array
- (
- 'type' => 'int-11',
- 'name' => '用户的优惠券id',
- 'default' => '',
- 'desc' => '用户的优惠券id',
- 'match' => 'option',
- ),
- 'coupon_cash' => array
- (
- 'type' => 'varchar-300',
- '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' => 'varchar-300',
- 'name' => '折扣优惠金额',
- 'default' => '0',
- 'desc' => '折扣优惠金额',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'method' => array
- (
- 'type' => 'int-11',
- 'name' => '配送类型',
- 'default' => '1',
- 'desc' => '配送类型',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'search' => $search_option_shop_type == 1 ? 'select' : false,
- 'option' => $method,
- 'list' => $search_option_shop_type == 1 ? true : false,
- 'list_order' => 5,
- ),
- 'code' => array
- (
- 'type' => 'varchar-100',
- 'name' => '自提码或者核销码',
- 'default' => '',
- 'desc' => '自提码或者核销码',
- 'match' => 'is_numeric',
- ),
- 'pay_method' => array
- (
- 'type' => 'int-11',
- 'name' => '订单类型',
- 'default' => '1',
- 'desc' => '订单类型',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'search' => $search_option_shop_type == 1 ? 'select' : false,
- 'option' => $pay_method,
- 'list' => $search_option_shop_type == 1 ? true : false,
- 'list_order' => 6,
- ),
- 'pay_type' => array
- (
- 'type' => 'int-11',
- 'name' => '支付渠道',
- 'default' => '1',
- 'desc' => '支付渠道',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $pay_type,
- 'list' => $search_option_shop_type == 1 ? true : false,
- 'list_order' => 13,
- ),
- 'info' => array
- (
- 'type' => 'varchar-300',
- 'name' => '订单备注',
- 'default' => '',
- 'desc' => '订单备注',
- 'match' => 'option',
- 'update' => 'textarea',
- ),
- 'withdraw' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '是否提现',
- 'default' => '1',
- 'desc' => '是否提现',
- 'match' => 'is_numeric',
- 'option' => $withdraw,
- //'search' => 'select',
- ),
- 'shop_type' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '门店类型',
- 'default' => '1',
- 'desc' => '门店类型',
- 'match' => 'is_numeric',
- 'option' => $shop_type,
- 'search' => 'hidden',
- //'search' => 'select',
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '订单状态',
- 'default' => '1',
- 'desc' => '订单状态',
- 'match' => 'is_numeric',
- 'option' => $status_manage,
- 'search' => 'select',
- //'search_after' => '<br />',
- 'list' => true,
- 'list_order' => 14,
- 'mul' => true,
- 'mul_option' => array(2 => '批量审核', 5 => '确认收货'),
- ),
- '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',
- ),
- 'notice' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '是否发送通知',
- 'default' => '1',
- 'desc' => '是否发送通知',
- 'match' => 'is_numeric',
- ),
- 'fdate' => array
- (
- 'type' => 'int-11',
- 'name' => '完成时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- 'search' => 'date',
- 'list_name' =>'收货时间',
- 'list' => '"{fdate}" ? date("Y-m-d H:i", \'{fdate}\') : "-"',
- 'list_order' => 8,
- ),
- 'paydate' => array
- (
- 'type' => 'int-11',
- 'name' => '付款时间',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '',
- 'list' => '"{paydate}" > 0 ? date("Y-m-d H:i", {paydate}) : "-"',
- 'list_order' => 9,
- ),
- 'operdate' => 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,
- ),
- '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' => 8,
- ),
- 'shop-sell_order_ps-cdate'=> array
- (
- 'name' => '发货时间',
- 'default' => '',
- 'desc' => '发货时间',
- 'match' => 'option',
- # 读取另外表的关联方式
- 'sync' => array('id', 'order_id'),
- // 'list' => '"{shop-sell_order_ps-cdate}" ? date("Y-m-d H:i", \'{shop-sell_order_ps-cdate}\') : "-"',
- // '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' => 'sdate',
- 'list' => 'date("Y-m-d H:i", {cdate})',
- //'list' => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',
- 'list_order' => 7,
- ),
- ),
- 'manage' => array
- (
- 'delete' => false,
- 'edit' => false,
- 'insert' => false,
- 'excel' => $excel,
- 'mul' => $mul,
- # 表格使用html模式,默认是js渲染模式
- 'list_table' => 'html',
- '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'),
- //'location2' => array('分配仓库', Dever::url('lib/set.store', 'shop')),
- //'edit' => array('分配仓库', 'store_id', '{status} == 2 && {shop_type} == 2'),
- //'fast1' => array('发货', '"sell_order_ps&where_id={id}&search_option_order_id={id}&oper_save_jump=sell_order&oper_table=sell_order&oper_parent=sell_order"', '{status} == 2 && {shop_type} == 2'),
- //'fast' => array('审核', '"sell_order&where_id={id}&col=audit,audit_desc&oper_save_jump=sell_order&oper_table=sell_order&oper_parent=sell_order"', '{status} == 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'),
- //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin,tk_status', '{status} == 6'),
- //'delete' => array('删除', '', '{status} == 1'),
- ),
- ),
- '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' => '*',
- ),
- 'getYes' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'shop_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'col' => '*',
- ),
- # 获取提交订单超过12个小时
- 'getDataByTime' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'id' => 'yes',
- 'cdate' => array('yes', '<='),
- 'status' => array('yes', 'in'),
- 'withdraw' => 'yes',
- 'notice' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'col' => '*',
- ),
- # 获取1,2
- 'getBuy' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'status' => 'yes',
- 'shop_id' => 'yes',
- 'order_num' => 'yes',
- 'uid' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('id' => 'desc'),
- 'col' => '*',
- ),
- 'getMyAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'uid' => 'yes',
- 'status' => 'yes',
- 'cate_id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('id' => 'desc'),
- 'page' => array(10, 'list'),
- 'col' => 'id,order_num,name,buy_num,cdate,cash,shop_id,buy_id',
- ),
- # 删除未支付订单
- 'drop' => array
- (
- # 匹配的正则或函数 选填项
- 'where' => array
- (
- 'time' => array('yes-cdate', '<='),
- 'status' => 1,
- 'state' => 1,
- ),
- 'type' => 'delete',
- 'col' => 'id,order_num',
- ),
- # 获取数据
- 'getAllByDate' => array
- (
- # 匹配的正则或函数 选填项
- 'where' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'col' => 'id,order_num,mobile,shop_id,cdate,price-refund_cash as total,num-refund_num as num',
- ),
- # 获取订单数量
- 'getOrderNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'shop_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'count',
- 'col' => '*',
- ),
- # 获取总金额
- 'getCashNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'shop_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(price-refund_cash) as total',
- ),
- # 获取商品数量
- 'getGoodsNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'shop_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(num-refund_num) as total',
- ),
- # 获取订单数量
- 'getUser' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'shop_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'all',
- 'group' => 'mobile',
- 'col' => 'count(mobile) as total',
- ),
- 'getUserNum' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'shop_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'count',
- 'col' => '*',
- ),
- 'getSumCdate' => array
- (
- # 匹配的正则或函数 选填项
- 'where' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'card_code_id' => 'yes',
- // 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(card_code_cash) as total',
- ),
- 'getCardAll' => array
- (
- # 匹配的正则或函数 选填项
- 'where' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'card_code_id' => 'yes',
- // 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(card_code_cash) as total',
- ),
- 'getCardAlls' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'card_code_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'sum(card_code_cash) as total',
- ),
- 'getSellDui' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'id' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'one',
- 'col' => 'num',
- ),
- 'getExcel' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'start' => array('yes-cdate','>='),
- 'end' => array('yes-cdate','<='),
- 'fastart' => array('yes-fadate','>='),
- 'faend' => array('yes-fadate','<='),
- 'fstart' => array('yes-fdate','>='),
- 'fend' => array('yes-fdate','<='),
- 'shop_type' => 'yes',
- 'name' => 'yes',
- 'shop_id' => 'yes',
- 'order_num' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'page' => array(20, 'list'),
- 'col' => '*',
- ),
- 'getOutOne' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'shop_id' => 'yes',
- 'start' => array('yes-cdate', '>='),
- 'end' => array('yes-cdate', '<='),
- 'card_code_id' => 'yes',
- 'status' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'one',
- // 'page' => array(20, 'list'),
- 'col' => '*',
- ),
- ),
- );
|