array('name' => '待审核', 'style' => 'font-weight:bold;color:#436EEE'), 2 => array('name' => '已审核', 'style' => 'font-weight:bold;color:#003366'), 3 => array('name' => '已驳回', 'style' => 'font-weight:bold;color:#993333'), ); $audit = array ( //1 => '待审核', 2 => '审核通过', 3 => '审核未通过', ); $type = function() { return Dever::db('scm_seller/in_order_type')->state(); }; $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)); }; } $source_type = array ( 1 => '供应商', 2 => '配送商仓库', 3 => '经销商门店', 10 => '其他', ); $seller = function() { return Dever::db('scm_seller/info')->state(); }; $col = Dever::input('col'); return array ( # 表名 'name' => 'in_order', # 显示给用户看的名称 'lang' => '入库单查询', 'order' => 10, 'set' => array ( 'status' => $status, 'audit' => $audit, ), 'end' => array ( 'insert' => 'scm/lib/order.updateOrderNum?table=scm_seller/in_order&prefix=CI', 'update' => 'scm/lib/stock.update_commit?table=scm_seller/in_order&stock=scm_seller/shop_goods&type=in&col=seller_shop_id', ), # 数据结构 '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", "in", {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", {seller_shop_id})', ), 'source_type' => array ( 'type' => 'int-11', 'name' => '来源类型', 'default' => '1', 'desc' => '来源类型', 'match' => 'is_numeric', ), 'source_id' => array ( 'type' => 'int-11', 'name' => '来源', 'default' => '', 'desc' => '来源', 'match' => 'is_numeric', ), 'type' => array ( 'type' => 'int-11', 'name' => '入库类型', 'default' => '1', 'desc' => '入库类型', 'match' => 'is_numeric', 'update' => 'radio', 'search' => 'select', 'option' => $type, //'list' => true, ), '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-in_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/in_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' => '1', 'desc' => '订单状态', 'match' => 'is_numeric', 'option' => $status, 'search' => 'select', 'list' => true, //'search_after' => '
', //'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-in_order_goods', 'delete' => false, 'edit' => false, 'insert' => false, //'excel' => $excel, //'mul' => $mul, 'button' => array ( //'导出订单明细' => array('excel', 'shop/excel.sell_order'), '类型配置' => array('list', 'in_order_type&oper_parent=in_order'), ), 'list_button' => array ( 'list' => array('查看详情', '"in_order_goods&type=in&page_type=1&order_id={id}"'), 'fast' => array('审核', '"in_order&where_id={id}&col=audit,audit_desc"', '{status} == 1'), ), ), 'request' => array ( ), );