|
@@ -0,0 +1,274 @@
|
|
|
+<?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/out_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));
|
|
|
+ };
|
|
|
+}
|
|
|
+
|
|
|
+$servicer = function() {
|
|
|
+ return Dever::db('scm_servicer/info')->state();
|
|
|
+};
|
|
|
+
|
|
|
+return array
|
|
|
+(
|
|
|
+ # 表名
|
|
|
+ 'name' => 'out_order',
|
|
|
+ # 显示给用户看的名称
|
|
|
+ 'lang' => '出库单查询',
|
|
|
+ 'order' => 8,
|
|
|
+ 'set' => array
|
|
|
+ (
|
|
|
+ 'status' => $status,
|
|
|
+ ),
|
|
|
+ 'end' => array
|
|
|
+ (
|
|
|
+ 'insert' => 'scm_product/lib/order.updateOrderNum?table=scm_servicer/out_order&prefix=CO',
|
|
|
+ 'update' => 'scm_product/lib/stock.update_commit?table=scm_servicer/out_order&stock=scm_servicer/store_goods&type=out&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/out.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})',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'type' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '出库类型',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '出库类型',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'radio',
|
|
|
+ 'option' => $type,
|
|
|
+ 'list' => true,
|
|
|
+ 'control' => 'type',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'relate_order_num' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-300',
|
|
|
+ 'name' => '关联单据号',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '关联单据号',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ //'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'in_servicer_store_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '入库仓库',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '入库仓库',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'select',
|
|
|
+ 'option' => $store,
|
|
|
+ 'show' => 'type=1',
|
|
|
+ //'list' => 'Dever::load("scm_servicer/store-one#name", {servicer_store_id})',
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'scm_servicer-out_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/out_order_goods")',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'audit' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '审核状态',
|
|
|
+ 'default' => '2',
|
|
|
+ 'desc' => '审核状态',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $audit,
|
|
|
+ //'update' => 'radio',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'audit_desc' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-500',
|
|
|
+ 'name' => '审核备注',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '审核备注',
|
|
|
+ 'match' => 'option',
|
|
|
+ //'update' => 'textarea',
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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', 'out_order_type&oper_parent=out_order'),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'list_button' => array
|
|
|
+ (
|
|
|
+ 'list' => array('查看详情', '"out_order_goods&page_type=1&order_id={id}"'),
|
|
|
+
|
|
|
+ 'fast' => array('审核', '"out_order&where_id={id}&col=audit,audit_desc"', '{status} == 1'),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'request' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ ),
|
|
|
+);
|