| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 | <?php$status = array(    1 => 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));	};}$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,    ),    'end' => array    (        'insert' => 'scm_product/lib/order.updateOrderNum?table=scm_servicer/in_order&prefix=CI',        'update' => 'scm_product/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/in.info", {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' => '<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    (        '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&page_type=1&order_id={id}"'),            'fast' => array('审核', '"in_order&where_id={id}&col=audit,audit_desc"', '{status} == 1'),        ),    ),    'request' => array    (            ),);
 |