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_servicer/in_order_type')->state(); }; $store = array(); $servicer_id = Dever::input('search_option_servicer_id'); if ($servicer_id) { $store = function() use($servicer_id) { return Dever::db('scm_servicer/store')->state(array('servicer_id' => $servicer_id, 'status' => 1)); }; } $supplier = function() use($servicer_id) { return Dever::db('scm_servicer/supplier')->getData(array('servicer_id' => $servicer_id)); }; $servicer = function() { return Dever::db('scm_servicer/info')->state(); }; $col = Dever::input('col'); return array ( # 表名 'name' => 'in_order', # 显示给用户看的名称 'lang' => '入库单查询', 'order' => 9, 'set' => array ( 'status' => $status, 'audit' => $audit, ), 'end' => array ( 'insert' => 'scm/lib/order.updateOrderNum?table=scm_servicer/in_order&prefix=CI', 'update' => 'scm/lib/stock.update_commit?table=scm_servicer/in_order&stock=scm_servicer/store_goods&type=in&col=servicer_store_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_servicer/lib/manage.info", "in", {id})', ), 'servicer_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' => $servicer, 'value' => $servicer_id, //'list' => 'Dever::load("scm_servicer/info-one#name", {servicer_id})', ), 'servicer_store_id' => array ( 'type' => 'int-11', 'name' => '仓库', 'default' => '', 'desc' => '仓库', 'match' => 'is_numeric', 'update' => 'select', 'option' => $store, //'list' => 'Dever::load("scm_servicer/store-one#name", {servicer_store_id})', ), 'supplier_id' => array ( 'type' => 'int-11', 'name' => '供应商', 'default' => '', 'desc' => '供应商', 'match' => 'is_numeric', 'update' => 'select', 'option' => $supplier, //'list' => 'Dever::load("scm_supplier/info-one#name", {supplier_id})', ), '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_servicer-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_servicer/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_servicer-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 ( ), );