|
|
@@ -3,10 +3,11 @@
|
|
|
namespace App;
|
|
|
|
|
|
use App\Traits\ModelTimeFormat;
|
|
|
-use Illuminate\Database\Eloquent\Model;
|
|
|
-
|
|
|
use App\Traits\ModelLogChanging;
|
|
|
+
|
|
|
+use Illuminate\Database\Eloquent\Model;
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
+use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
|
|
@@ -21,7 +22,7 @@ class WorkOrderDetail extends Model
|
|
|
'price', // 商品价值
|
|
|
'sku_amount', // 破损sku数
|
|
|
'type', // 快递异常填写:在途异常,签收未收到
|
|
|
- 'last_handler_id', // 上一个处理人
|
|
|
+ 'last_handler_id', // 上一个处理人
|
|
|
'reissue_logistic_number', // 补发单号
|
|
|
'return_logistic_number', // 退回单号 (错漏发:商家填写) (破损:创建时填写)
|
|
|
'process_progress', // 处理进度
|
|
|
@@ -33,8 +34,12 @@ class WorkOrderDetail extends Model
|
|
|
'return_address', // 退回单 寄件人地址
|
|
|
'return_phone', // 退回单 寄件人联系号码
|
|
|
'return_name', // 退回单 寄件人姓名
|
|
|
-
|
|
|
'logistic_handle_tag', // 承运商在处理标记
|
|
|
+ 'logistic_indemnity_money', // 承运商赔偿金额
|
|
|
+ 'logistic_express_remission', // 承运商减免
|
|
|
+ 'bao_shi_indemnity_money', // 宝时赔偿金额
|
|
|
+ 'bao_shi_express_remission', // 宝时减免
|
|
|
+ 'user_owner_group_id',
|
|
|
];
|
|
|
|
|
|
static public $enums = [
|
|
|
@@ -198,6 +203,16 @@ class WorkOrderDetail extends Model
|
|
|
return $this->hasMany(WorkOrderProcessLog::class,'work_order_detail_id','id');
|
|
|
}
|
|
|
|
|
|
+ public function userOwnerGroup(): BelongsTo
|
|
|
+ {
|
|
|
+ return $this->belongsTo(UserOwnerGroup::class);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function userWorkgroups(): BelongsToMany
|
|
|
+ {
|
|
|
+ return $this->belongsToMany(UserWorkgroup::class);
|
|
|
+ }
|
|
|
+
|
|
|
// 未完成历史标记
|
|
|
public function undoneTag()
|
|
|
{
|