创建版本
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php namespace Gdoo\Order\Models;
|
||||
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
class CancelOrder extends BaseModel
|
||||
{
|
||||
protected $table = 'cancel_order';
|
||||
|
||||
public static $tabs = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['url' => 'order/cancel/index', 'name' => '客户退货', 'value' => 'index'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $todo_tabs = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['url' => 'order/cancel/todo', 'name' => '待办中', 'value' => 'todo'],
|
||||
['url' => 'order/cancel/todo', 'name' => '已办理', 'value' => 'trans'],
|
||||
['url' => 'order/cancel/todo', 'name' => '已结束', 'value' => 'done'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $bys = [
|
||||
'name' => 'by',
|
||||
'items' => [
|
||||
['value' => '', 'name' => '全部'],
|
||||
['value' => 'divider'],
|
||||
['value' => 'day', 'name' => '今日创建'],
|
||||
['value' => 'week', 'name' => '本周创建'],
|
||||
['value' => 'month', 'name' => '本月创建'],
|
||||
]
|
||||
];
|
||||
|
||||
public function datas()
|
||||
{
|
||||
return $this->hasMany('Gdoo\Order\Models\CustomerOrderData');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php namespace Gdoo\Order\Models;
|
||||
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
class CancelOrderData extends BaseModel
|
||||
{
|
||||
protected $table = 'cancel_order_data';
|
||||
|
||||
public function datas()
|
||||
{
|
||||
return $this->hasMany('Gdoo\Order\Models\CancelOrderData');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php namespace Gdoo\Order\Models;
|
||||
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
class CustomerDelivery extends BaseModel
|
||||
{
|
||||
protected $table = 'customer_delivery';
|
||||
|
||||
public static $tabs = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['url' => 'order/delivery/index', 'name' => '客户发货', 'value' => 'index'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $todo_tabs = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['url' => 'order/delivery/todo', 'name' => '待办中', 'value' => 'todo'],
|
||||
['url' => 'order/delivery/todo', 'name' => '已办理', 'value' => 'trans'],
|
||||
['url' => 'order/delivery/todo', 'name' => '已结束', 'value' => 'done'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $bys = [
|
||||
'name' => 'by',
|
||||
'items' => [
|
||||
['value' => '', 'name' => '全部'],
|
||||
['value' => 'divider'],
|
||||
['value' => 'day', 'name' => '今日创建'],
|
||||
['value' => 'week', 'name' => '本周创建'],
|
||||
['value' => 'month', 'name' => '本月创建'],
|
||||
]
|
||||
];
|
||||
|
||||
public function promotions()
|
||||
{
|
||||
return $this->hasMany('Gdoo\Promotion\Models\Promotion', 'customer_id', 'customer_id');
|
||||
}
|
||||
|
||||
public function approachs()
|
||||
{
|
||||
return $this->hasMany('Gdoo\Approach\Models\Approach', 'customer_id', 'customer_id');
|
||||
}
|
||||
|
||||
public function datas()
|
||||
{
|
||||
return $this->hasMany('Gdoo\Order\Models\CustomerOrderData');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php namespace Gdoo\Order\Models;
|
||||
|
||||
use DB;
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
use Gdoo\CustomerCost\Models\CostData;
|
||||
|
||||
class CustomerOrder extends BaseModel
|
||||
{
|
||||
protected $table = 'customer_order';
|
||||
|
||||
public static $tabs = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['url' => 'order/order/index', 'name' => '销售订单', 'value' => 'order.index'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $tabs2 = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['url' => 'order/order/detail', 'name' => '销售订单明细', 'value' => 'order.detail'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $tabs3 = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['url' => 'order/order/delivery', 'name' => '发货计划', 'value' => 'delivery'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $bys = [
|
||||
'name' => 'by',
|
||||
'items' => [
|
||||
['value' => '', 'name' => '全部'],
|
||||
['value' => 'divider'],
|
||||
['value' => 'day', 'name' => '今日创建'],
|
||||
['value' => 'week', 'name' => '本周创建'],
|
||||
['value' => 'month', 'name' => '本月创建'],
|
||||
]
|
||||
];
|
||||
|
||||
public function promotions()
|
||||
{
|
||||
return $this->hasMany('Gdoo\Promotion\Models\Promotion', 'customer_id', 'customer_id');
|
||||
}
|
||||
|
||||
public function approachs()
|
||||
{
|
||||
return $this->hasMany('Gdoo\Approach\Models\Approach', 'customer_id', 'customer_id');
|
||||
}
|
||||
|
||||
public function datas()
|
||||
{
|
||||
return $this->hasMany('Gdoo\Order\Models\CustomerOrderData');
|
||||
}
|
||||
|
||||
public function scopeDialog($q, $value)
|
||||
{
|
||||
return $q->whereIn('id', $value)->pluck('sn', 'id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php namespace Gdoo\Order\Models;
|
||||
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
class CustomerOrderData extends BaseModel
|
||||
{
|
||||
protected $table = 'customer_order_data';
|
||||
|
||||
public function product()
|
||||
{
|
||||
return $this->belongsTo('Gdoo\Product\Models\Product');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php namespace Gdoo\Order\Models;
|
||||
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
class CustomerOrderType extends BaseModel
|
||||
{
|
||||
protected $table = 'customer_order_type';
|
||||
|
||||
public static $tabs = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['value' => 'type.index', 'url' => 'order/type/index', 'name' => '订单类型'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $bys = [
|
||||
'name' => 'by',
|
||||
'items' => [
|
||||
['value' => '', 'name' => '全部'],
|
||||
['value' => 'divider'],
|
||||
['value' => 'day', 'name' => '今日创建'],
|
||||
['value' => 'week', 'name' => '本周创建'],
|
||||
['value' => 'month', 'name' => '本月创建'],
|
||||
]
|
||||
];
|
||||
|
||||
public function scopeDialog($q, $value)
|
||||
{
|
||||
return $q->whereIn('id', $value)->pluck('name', 'id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php namespace Gdoo\Order\Models;
|
||||
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
class Logistics extends BaseModel
|
||||
{
|
||||
protected $table = 'logistics';
|
||||
|
||||
public static $tabs = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['value' => 'logistics.index', 'url' => 'order/logistics/index', 'name' => '物流公司'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $bys = [
|
||||
'name' => 'by',
|
||||
'items' => [
|
||||
['value' => '', 'name' => '全部'],
|
||||
['value' => 'divider'],
|
||||
['value' => 'day', 'name' => '今日创建'],
|
||||
['value' => 'week', 'name' => '本周创建'],
|
||||
['value' => 'month', 'name' => '本月创建'],
|
||||
]
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php namespace Gdoo\Order\Models;
|
||||
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
class OrderTransport extends BaseModel
|
||||
{
|
||||
protected $table = 'order_transport';
|
||||
|
||||
public function datas()
|
||||
{
|
||||
return $this->hasMany('Gdoo\Order\Models\OrderData', 'order_id', 'order_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php namespace Gdoo\Order\Models;
|
||||
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
class SampleApply extends BaseModel
|
||||
{
|
||||
protected $table = 'sample_apply';
|
||||
|
||||
public static $tabs = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['url' => 'order/sampleApply/index', 'name' => '样品申请', 'value' => 'index'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $tabs2 = [
|
||||
'name' => 'tab',
|
||||
'items' => [
|
||||
['url' => 'order/sampleApply/detail', 'name' => '样品申请明细', 'value' => 'detail'],
|
||||
]
|
||||
];
|
||||
|
||||
public static $bys = [
|
||||
'name' => 'by',
|
||||
'items' => [
|
||||
['value' => '', 'name' => '全部'],
|
||||
['value' => 'divider'],
|
||||
['value' => 'day', 'name' => '今日创建'],
|
||||
['value' => 'week', 'name' => '本周创建'],
|
||||
['value' => 'month', 'name' => '本月创建'],
|
||||
]
|
||||
];
|
||||
|
||||
public function datas()
|
||||
{
|
||||
return $this->hasMany('Gdoo\Order\Models\CustomerOrderData');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php namespace Gdoo\Order\Models;
|
||||
|
||||
use Gdoo\Index\Models\BaseModel;
|
||||
|
||||
class SampleApplyData extends BaseModel
|
||||
{
|
||||
protected $table = 'sample_apply_data';
|
||||
}
|
||||
Reference in New Issue
Block a user