123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- <?php
- $status = array
- (
- 1 => array('name' => '待支付', 'style' => 'font-weight:bold;color:#F8046E'),
- 2 => array('name' => '待审核', 'style' => 'font-weight:bold;color:#436EEE'),
- 3 => array('name' => '待处理', 'style' => 'font-weight:bold;color:#003366'),
- 4 => array('name' => '待确认', 'style' => 'font-weight:bold;color:#003366'),
- 5 => array('name' => '已完成', 'style' => 'font-weight:bold;color:#0978F8'),
- 6 => array('name' => '已完成(有退款)', 'style' => 'font-weight:bold;color:#0978F8'),
- 7 => array('name' => '已取消', 'style' => 'font-weight:bold;color:#993333'),
- 8 => array('name' => '已退款', 'style' => 'font-weight:bold;color:#993333'),
- 11 => array('name' => '已过期', 'style' => 'font-weight:bold;color:#993333'),
- );
- $audit = array
- (
- 1 => '待审核',
- 2 => '审核通过',
- 3 => '审核未通过',
- );
- $shop = array();
- $seller_id = Dever::input('search_option_seller_id');
- if ($seller_id) {
- $shop = function() use($seller_id) {
- return Dever::db('scm_seller/shop')->state(array('seller_id' => $seller_id, 'status' => 1));
- };
- }
- $seller = function() {
- return Dever::db('scm_seller/info')->state();
- };
- $col = Dever::input('col');
- return array
- (
- # 表名
- 'name' => 'buy_order',
- # 显示给用户看的名称
- 'lang' => '采购单查询',
- 'order' => 20,
- 'set' => array
- (
- 'status' => $status,
- 'audit' => $audit,
- ),
- 'end' => array
- (
- 'insert' => 'scm/lib/order.updateOrderNum?table=scm_seller/buy_order&prefix=BU',
- ),
- # 数据结构
- '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',
- 'search' => 'fulltext',
- 'list_name' => '订单信息',
- 'list' => 'Dever::load("scm_seller/lib/manage.info", "buy", {id})',
- ),
- 'seller_id' => array
- (
- 'type' => 'int-11',
- 'name' => '经销商',
- 'default' => '',
- 'desc' => '经销商',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- 'searchs' => array
- (
- 'api' => 'scm_role/seller-like',
- 'col' => 'name',
- 'result' => 'id',
- ),
- 'search' => 'select',
- 'option' => $seller,
- 'value' => $seller_id,
- //'list' => 'Dever::load("scm_seller/info-one#name", {seller_id})',
- ),
- 'seller_shop_id' => array
- (
- 'type' => 'int-11',
- 'name' => '门店',
- 'default' => '',
- 'desc' => '门店',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $shop,
- //'list' => 'Dever::load("scm_seller/shop-one#name", {servicer_shop_id})',
- ),
- 'relate_order_num' => array
- (
- 'type' => 'varchar-300',
- 'name' => '关联单据号',
- 'default' => '',
- 'desc' => '关联单据号',
- 'match' => 'option',
- //'update' => 'text',
- //'list' => true,
- ),
- 'info' => array
- (
- 'type' => 'varchar-300',
- 'name' => '订单备注',
- 'default' => '',
- 'desc' => '订单备注',
- 'match' => 'option',
- 'update' => 'text',
- //'list' => true,
- ),
- 'address' => array
- (
- 'type' => 'varchar-1000',
- 'name' => '收货信息',
- 'default' => '',
- 'desc' => '收货信息',
- 'match' => 'is_string',
- //'update' => 'text',
- //'search' => 'fulltext',
- //'list' => true,
- ),
- 'scm_seller-buy_order_goods'=> array
- (
- 'name' => '商品设置',
- 'default' => '',
- 'desc' => '商品设置',
- 'match' => 'option',
- # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
- 'sync' => array('id', 'order_id'),
- 'update' => array(1),
- # 1纵向展示 2横向展示
- 'update_type' => 2,
- 'list_name' => '商品信息',
- 'list' => 'Dever::load("scm_product/lib/manage.getGoods", {id}, "scm_seller/buy_order_goods")',
- ),
- 'audit' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '审核状态',
- 'default' => '2',
- 'desc' => '审核状态',
- 'match' => 'is_numeric',
- 'option' => $audit,
- 'update' => $col ? 'radio' : false,
- ),
- 'audit_desc' => array
- (
- 'type' => 'varchar-500',
- 'name' => '审核备注',
- 'default' => '',
- 'desc' => '审核备注',
- 'match' => 'option',
- 'update' => $col ? 'textarea' : false,
- ),
- 'audit_admin' => array
- (
- 'type' => 'int-11',
- 'name' => '审核人',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '审核人',
- //'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '订单状态',
- 'default' => '2',
- 'desc' => '订单状态',
- 'match' => 'is_numeric',
- 'option' => $status,
- 'search' => 'select',
- 'list' => true,
- //'search_after' => '<br />',
- //'mul' => true,
- //'mul_option' => array(2 => '批量审核', 5 => '确认收货'),
- ),
- '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
- (
- # 后台提交时,检测该值是否为空,多个用逗号隔开
- 'update_check' => 'scm_seller-buy_order_goods',
- 'delete' => false,
- 'edit' => false,
- 'insert' => false,
- //'excel' => $excel,
- //'mul' => $mul,
- 'list_button' => array
- (
- 'list' => array('查看详情', '"buy_order_goods&type=buy&page_type=1&order_id={id}"'),
- 'list1' => array('审核', '"buy_order_goods&type=buy&page_type=1&order_id={id}&audit=1"', '{status} == 2'),
- ),
- ),
- 'request' => array
- (
-
- ),
- );
|