Browse Source

laravel7 json时间格式问题统一替换

LD 6 năm trước cách đây
mục cha
commit
6c3128579b
57 tập tin đã thay đổi với 133 bổ sung7 xóa
  1. 2 0
      app/AuditLog.php
  2. 2 0
      app/Authority.php
  3. 2 0
      app/BillingModel.php
  4. 2 0
      app/CarType.php
  5. 2 0
      app/Carrier.php
  6. 2 0
      app/City.php
  7. 2 0
      app/Commodity.php
  8. 2 0
      app/CommodityBarcode.php
  9. 2 0
      app/Depository.php
  10. 2 0
      app/Log.php
  11. 3 1
      app/Logistic.php
  12. 2 0
      app/LogisticNumberFeature.php
  13. 2 0
      app/MeasuringMachine.php
  14. 3 1
      app/OracleBasSKU.php
  15. 2 0
      app/OracleDOCASNDetail.php
  16. 2 0
      app/OracleDOCMovementDetail.php
  17. 2 0
      app/OracleDOCMovementHeader.php
  18. 2 0
      app/OracleDOCOrderDetail.php
  19. 3 1
      app/Owner.php
  20. 2 0
      app/Package.php
  21. 2 0
      app/PaperBox.php
  22. 2 0
      app/Process.php
  23. 2 0
      app/ProcessDaily.php
  24. 2 0
      app/ProcessDailyParticipant.php
  25. 2 0
      app/ProcessMethod.php
  26. 2 0
      app/ProcessStatistic.php
  27. 2 0
      app/ProcessesContent.php
  28. 2 0
      app/Province.php
  29. 3 1
      app/QualityLabel.php
  30. 3 1
      app/Rejected.php
  31. 3 1
      app/RejectedBill.php
  32. 3 1
      app/RejectedBillItem.php
  33. 2 0
      app/Role.php
  34. 2 0
      app/Store.php
  35. 2 0
      app/StoreItems.php
  36. 15 0
      app/Traits/ModelTimeFormat.php
  37. 2 0
      app/Tutorial.php
  38. 2 0
      app/TutorialContent.php
  39. 2 0
      app/Unit.php
  40. 2 0
      app/User.php
  41. 2 0
      app/UserDetail.php
  42. 2 0
      app/UserDutyCheck.php
  43. 2 0
      app/UserLabor.php
  44. 2 0
      app/WMSReflectPackage.php
  45. 2 0
      app/WMSReflectReceive.php
  46. 2 0
      app/WMSReflectReceiveSku.php
  47. 2 0
      app/WMSWaybill.php
  48. 2 0
      app/WMSWaybillOrder.php
  49. 2 0
      app/Warehouse.php
  50. 2 0
      app/Waybill.php
  51. 2 0
      app/WaybillAuditLog.php
  52. 2 0
      app/WaybillCalculate.php
  53. 2 0
      app/WaybillFinancialExcepted.php
  54. 2 0
      app/WaybillFinancialSnapshot.php
  55. 2 0
      app/WaybillPayoff.php
  56. 2 0
      app/WaybillPriceModel.php
  57. 1 0
      resources/views/process/create.blade.php

+ 2 - 0
app/AuditLog.php

@@ -4,9 +4,11 @@ namespace App;
 
 use Illuminate\Database\Eloquent\Model;
 use Illuminate\Database\Eloquent\SoftDeletes;
+use App\Traits\ModelTimeFormat;
 
 class AuditLog extends Model
 {
+    use ModelTimeFormat;
     use SoftDeletes;
     protected $table='audit_logs';
     protected $fillable=[

+ 2 - 0
app/Authority.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Authority extends Model
 {
+    use ModelTimeFormat;
     protected $fillable = ['name','remark','id_parent','alias_name'];
     function roles(){
         return $this->belongsToMany('App\Role','authority_role','id_authority','id_role');

+ 2 - 0
app/BillingModel.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class BillingModel extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'carrier_id','province_id','city_id','unit_id','range_min','range_max','unit_price','initial_weight'
     ];

+ 2 - 0
app/CarType.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class CarType extends Model
 {
+    use ModelTimeFormat;
 
     protected $fillable=[
         'name','model','length','load','remark'

+ 2 - 0
app/Carrier.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Carrier extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'name','mobile','delivery_fee','remark'
     ];

+ 2 - 0
app/City.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class City extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'province_id','name'
     ];

+ 2 - 0
app/Commodity.php

@@ -4,9 +4,11 @@ namespace App;
 
 use Illuminate\Database\Eloquent\Builder;
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Commodity extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=['name','sku','owner_id','created_at'];
     protected $appends=['barcode','owner_name','owner_code'];
 

+ 2 - 0
app/CommodityBarcode.php

@@ -3,8 +3,10 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class CommodityBarcode extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=['code','commodity_id','created_at'];
 }

+ 2 - 0
app/Depository.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Depository extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'name','code'
     ];

+ 2 - 0
app/Log.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Log extends Model
 {
+    use ModelTimeFormat;
     protected $fillable = [
         'operation', 'description','type', 'operator', 'ip','id_user',
     ];

+ 3 - 1
app/Logistic.php

@@ -7,8 +7,10 @@ use Illuminate\Database\Eloquent\Model;
 
 /**
  * @method static Builder orderBy(string $string, string $string1)
- */
+ */use App\Traits\ModelTimeFormat;
+
 class Logistic extends Model
 {
+    use ModelTimeFormat;
     protected $fillable = ['name','code'];
 }

+ 2 - 0
app/LogisticNumberFeature.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class LogisticNumberFeature extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=['logistic_id','name','value','weight'];
     static public $featureConsideringLength=4;
 }

+ 2 - 0
app/MeasuringMachine.php

@@ -4,9 +4,11 @@ namespace App;
 
 use App\Events\WeighedEvent;
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class MeasuringMachine extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'name','code','status',
     ];

+ 3 - 1
app/OracleBasSKU.php

@@ -7,9 +7,11 @@ use Illuminate\Database\Eloquent\Model;
 /**
  * WMS_USER
  * 产品档案 OracleBas_SKU
- */
+ */use App\Traits\ModelTimeFormat;
+
 class OracleBasSKU extends Model
 {
+    use ModelTimeFormat;
     protected $connection="oracle";
     protected $table="BAS_SKU";
 }

+ 2 - 0
app/OracleDOCASNDetail.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class OracleDOCASNDetail extends Model
 {
+    use ModelTimeFormat;
     protected $connection="oracle";
     protected $table="Doc_ASN_Details";
 }

+ 2 - 0
app/OracleDOCMovementDetail.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class OracleDOCMovementDetail extends Model
 {
+    use ModelTimeFormat;
     protected $connection="oracle";
     protected $table="DOC_Movement_Details";
 }

+ 2 - 0
app/OracleDOCMovementHeader.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class OracleDOCMovementHeader extends Model
 {
+    use ModelTimeFormat;
     protected $connection="oracle";
     protected $table="DOC_Movement_Header";
     protected $primaryKey="MDOCNO";

+ 2 - 0
app/OracleDOCOrderDetail.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class OracleDOCOrderDetail extends Model
 {
+    use ModelTimeFormat;
     protected $connection="oracle";
     protected $table="DOC_Order_Details";
 }

+ 3 - 1
app/Owner.php

@@ -7,9 +7,11 @@ use Illuminate\Support\Facades\Auth;
 
 /**
  * @method static orderBy(string $string, string $string1)
- */
+ */use App\Traits\ModelTimeFormat;
+
 class Owner extends Model
 {
+    use ModelTimeFormat;
     public $fillable = ['name','code','checking_count'];
     public static function filterAuthorities(){
         $user=Auth::user();

+ 2 - 0
app/Package.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Package extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'owner_id','logistic_number','delivery_number','batch_number','batch_rule','recipient','recipient_mobile','logistic_id',
         'measuring_machine_id','weight','length','width','height','bulk','paper_box_id','status','weighed_at'

+ 2 - 0
app/PaperBox.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class PaperBox extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'model','length','width','height',
     ];

+ 2 - 0
app/Process.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Process extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'code','owner_id','process_method_id','unit_price','status','remark','amount','completed_amount','created_at','updated_at'
     ];

+ 2 - 0
app/ProcessDaily.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class ProcessDaily extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'process_id','date','output','remain'
     ];

+ 2 - 0
app/ProcessDailyParticipant.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class ProcessDailyParticipant extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'process_daily_id','user_id','started_at','ended_at','hour_price',
         'hour_count','unit_price','unit_count','dinner_duration','remark','status'

+ 2 - 0
app/ProcessMethod.php

@@ -3,8 +3,10 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class ProcessMethod extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=['name'];
 }

+ 2 - 0
app/ProcessStatistic.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class ProcessStatistic extends Model
 {
+    use ModelTimeFormat;
     //重新约定主键且不允许自增
     protected $primaryKey='process_id';
     public $incrementing=false;

+ 2 - 0
app/ProcessesContent.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class ProcessesContent extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'process_id','bill_type','commodity_id','wms_code','amount'
     ];

+ 2 - 0
app/Province.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Province extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'name'
     ];

+ 3 - 1
app/QualityLabel.php

@@ -7,8 +7,10 @@ use Illuminate\Database\Eloquent\Model;
 
 /**
  * @method static Builder orderBy(string $string, string $string1)
- */
+ */use App\Traits\ModelTimeFormat;
+
 class QualityLabel extends Model
 {
+    use ModelTimeFormat;
     protected $fillable = ['name'];
 }

+ 3 - 1
app/Rejected.php

@@ -7,9 +7,11 @@ use Illuminate\Database\Eloquent\Model;
 
 /**
  * @method static Builder orderBy(string $string, string $string1)
- */
+ */use App\Traits\ModelTimeFormat;
+
 class Rejected extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=['id_owner','order_number','sender','mobile_sender',
         'logistic_number','logistic_number_return','id_logistic_return',
         'validity_at','batch_number','id_quality_label','amount','name_goods',

+ 3 - 1
app/RejectedBill.php

@@ -13,9 +13,11 @@ use Overtrue\LaravelPinyin\Facades\Pinyin;
 
 /**
  * @method static find(array|string|null $param)
- */
+ */use App\Traits\ModelTimeFormat;
+
 class RejectedBill extends Model
 {
+    use ModelTimeFormat;
     use SoftDeletes;
     protected $fillable=['id_owner','order_number','sender','mobile_sender',
         'logistic_number','logistic_number_return','id_logistic_return',

+ 3 - 1
app/RejectedBillItem.php

@@ -9,9 +9,11 @@ use Illuminate\Database\Eloquent\SoftDeletes;
 
 /**
  * @property mixed rejectedBill
- */
+ */use App\Traits\ModelTimeFormat;
+
 class RejectedBillItem extends Model
 {
+    use ModelTimeFormat;
     use SoftDeletes;
     protected $fillable=['id_rejected_bill','barcode_goods','name_goods','amount','id_quality_label',
         'batch_number','validity_at','made_at','is_checked','remark','is_loaded'];

+ 2 - 0
app/Role.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Role extends Model
 {
+    use ModelTimeFormat;
     protected $fillable = ['name'];
     function users(){
         return $this->belongsToMany('App\User','user_role','id_role','id_user');

+ 2 - 0
app/Store.php

@@ -4,9 +4,11 @@ namespace App;
 
 use Illuminate\Database\Eloquent\Model;
 use Illuminate\Database\Eloquent\SoftDeletes;
+use App\Traits\ModelTimeFormat;
 
 class Store extends Model
 {
+    use ModelTimeFormat;
     use SoftDeletes;
 
     protected $fillable=[

+ 2 - 0
app/StoreItems.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class StoreItems extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'store_id','asn_line_code','name',
         'sku','barcode','depository_id','amount','quality','status',

+ 15 - 0
app/Traits/ModelTimeFormat.php

@@ -0,0 +1,15 @@
+<?php
+
+
+namespace App\Traits;
+
+
+use DateTimeInterface;
+
+trait ModelTimeFormat
+{
+    protected function serializeDate(DateTimeInterface $date)
+    {
+        return $date->format('Y-m-d H:i:s');
+    }
+}

+ 2 - 0
app/Tutorial.php

@@ -4,9 +4,11 @@ namespace App;
 
 use Illuminate\Database\Eloquent\Model;
 use Te7aHoudini\LaravelTrix\Traits\HasTrixRichText;
+use App\Traits\ModelTimeFormat;
 
 class Tutorial extends Model
 {
+    use ModelTimeFormat;
     use HasTrixRichText;
     protected $guarded=[];
 

+ 2 - 0
app/TutorialContent.php

@@ -4,9 +4,11 @@ namespace App;
 
 use Illuminate\Database\Eloquent\Model;
 use Te7aHoudini\LaravelTrix\Traits\HasTrixRichText;
+use App\Traits\ModelTimeFormat;
 
 class TutorialContent extends Model
 {
+    use ModelTimeFormat;
     use HasTrixRichText;
     protected $guarded=[];
 }

+ 2 - 0
app/Unit.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Unit extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'name'
     ];

+ 2 - 0
app/User.php

@@ -11,9 +11,11 @@ use Illuminate\Support\Facades\Auth;
 use Illuminate\Support\Facades\Cache;
 use Illuminate\Support\Facades\Gate;
 use Illuminate\Database\Eloquent\SoftDeletes;
+use App\Traits\ModelTimeFormat;
 
 class User extends Authenticatable
 {
+    use ModelTimeFormat;
     use Notifiable;
 
     /**

+ 2 - 0
app/UserDetail.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class UserDetail extends Model
 {
+    use ModelTimeFormat;
     protected $primaryKey='user_id';
     public $incrementing=false;
 

+ 2 - 0
app/UserDutyCheck.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class UserDutyCheck extends Model
 {
+    use ModelTimeFormat;
     public $timestamps=false;
 
     protected $fillable=[

+ 2 - 0
app/UserLabor.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class UserLabor extends Model
 {
+    use ModelTimeFormat;
     protected $primaryKey='user_id';
     public $incrementing=false;
     public $timestamps=false;

+ 2 - 0
app/WMSReflectPackage.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class WMSReflectPackage extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'TASKID','Orderno','palletid','SOReference5','Customer','Consigneename','CarrierID',
         'USERDEFINE1','USERDEFINE2','USERDEFINE3'

+ 2 - 0
app/WMSReflectReceive.php

@@ -4,9 +4,11 @@ namespace App;
 
 use Illuminate\Database\Eloquent\Model;
 use Illuminate\Support\Collection;
+use App\Traits\ModelTimeFormat;
 
 class WMSReflectReceive extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=['id_rejected_bill','is_uploaded','ASNNO','WAREHOUSEID','CUSTOMERID','ASNTYPE','ASNREFERENCE1',
         'ASNREFERENCE2','ASNREFERENCE3','NOTES','USERDEFINE1','USERDEFINE2','USERDEFINE3'];
     function skus(){

+ 2 - 0
app/WMSReflectReceiveSku.php

@@ -4,9 +4,11 @@ namespace App;
 
 use App\Http\Controllers\Controller;
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class WMSReflectReceiveSku extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=['ASNLINENO','SKU','ALTERNATE_SKU1','SKUDESCRC','EXPECTEDQTY_EACH',
         'LOTATT05','USERDEFINE4','USERDEFINE5','USERDEFINE6'];
     function receives(){

+ 2 - 0
app/WMSWaybill.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class WMSWaybill extends Model
 {
+    use ModelTimeFormat;
     //
     protected $fillable=['OrderNo','CustomerID','CarrierID','ConsigneeName',
         'C_Tel','C_Address','C_Province','C_City','C_District'];

+ 2 - 0
app/WMSWaybillOrder.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class WMSWaybillOrder extends Model
 {
+    use ModelTimeFormat;
     protected $fillable = ['OrderNo','SKU_Descr_c','SKU','Alternate_sku1','Qtyordered_each',
         'Cubic','GrossWeight','NetWeight'];
 }

+ 2 - 0
app/Warehouse.php

@@ -3,8 +3,10 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Warehouse extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=['name','code'];
 }

+ 2 - 0
app/Waybill.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class Waybill extends Model
 {
+    use ModelTimeFormat;
 
     protected $fillable=[
         'status','type','waybill_number','owner_id','wms_bill_number','origination','destination','recipient','recipient_mobile','charge','ordering_remark',

+ 2 - 0
app/WaybillAuditLog.php

@@ -4,9 +4,11 @@ namespace App;
 
 use Illuminate\Database\Eloquent\Model;
 use Illuminate\Database\Eloquent\SoftDeletes;
+use App\Traits\ModelTimeFormat;
 
 class WaybillAuditLog extends Model
 {
+    use ModelTimeFormat;
     use SoftDeletes;
     protected $table='waybill_audit_logs';
     protected $fillable=[

+ 2 - 0
app/WaybillCalculate.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class WaybillCalculate extends Model
 {
+    use ModelTimeFormat;
 
     protected $fillable=[
         'waybill_id','total_expense','total_receivable','gross_margin','gross_profit_rate'

+ 2 - 0
app/WaybillFinancialExcepted.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class WaybillFinancialExcepted extends Model
 {
+    use ModelTimeFormat;
     protected $fillable=[
         'waybill_id','json_content'
     ];

+ 2 - 0
app/WaybillFinancialSnapshot.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class WaybillFinancialSnapshot extends Model
 {
+    use ModelTimeFormat;
 
     protected $fillable=[
         'waybill_id','json_content'

+ 2 - 0
app/WaybillPayoff.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class WaybillPayoff extends Model
 {
+    use ModelTimeFormat;
 
     protected $fillable=[
         'waybill_id','total_expense','total_receivable','gross_margin','gross_profit_rate'

+ 2 - 0
app/WaybillPriceModel.php

@@ -3,9 +3,11 @@
 namespace App;
 
 use Illuminate\Database\Eloquent\Model;
+use App\Traits\ModelTimeFormat;
 
 class WaybillPriceModel extends Model
 {
+    use ModelTimeFormat;
 
     protected $fillable=[
         'carrier_id','province_id','city_id','unit_id','range_min','range_max','unit_price','base_fee','initial_weight'

+ 1 - 0
resources/views/process/create.blade.php

@@ -159,6 +159,7 @@
             },
             mounted:function(){
                 $(".tooltipTarget").tooltip({'trigger':'hover'});
+                alert(new Date('2017-05-04T18:30:00.000Z').to)
             },
             methods:{
                 //新增库单据