Просмотр исходного кода

运输管理-新增订单备注

Zhouzhendong 5 лет назад
Родитель
Сommit
a50915a169

+ 9 - 2
app/Http/Controllers/TestController.php

@@ -177,9 +177,16 @@ class TestController extends Controller
 
     public function test()
     {
-        $order = Order::query()->find(2734474);
+        $waybills = Waybill::query()->where("status","!=",'已完结')
+            ->whereNull("ordering_remark")->whereNotNull("order_id")->get();
+        foreach ($waybills as $waybill){
+            $notes = DB::connection("oracle")->selectOne(DB::raw("SELECT notes FROM DOC_ORDER_HEADER WHERE ORDERNO = ?"),[$waybill->wms_bill_number]);
+            if ($notes && $notes->notes)$waybill->update(["ordering_remark"=>$notes->notes]);
+        }
+
+       /* $order = Order::query()->find(2734474);
         $ser = new OrderService();
-        $ser->createInstantBill($order);
+        $ser->createInstantBill($order);*/
     }
     public function restoreResetInstantBill()
     {

+ 3 - 0
app/Http/Controllers/api/thirdPart/flux/WaybillController.php

@@ -14,6 +14,7 @@ use App\WMSWaybill;
 use App\WMSWaybillOrder;
 use Illuminate\Http\Request;
 use Illuminate\Support\Facades\Auth;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Validator;
 use Ramsey\Uuid\Uuid;
 use Zttp\Zttp;
@@ -97,6 +98,8 @@ class WaybillController extends Controller
                 if ($unit)$waybill->warehouse_weight_unit_id_other=$unit->id;
             }
             if ($waybill->wms_bill_number){
+                $notes = DB::connection("oracle")->selectOne(DB::raw("SELECT notes FROM DOC_ORDER_HEADER WHERE ORDERNO = ?"),[$waybill->wms_bill_number]);
+                if ($notes)$waybill->ordering_remark = $notes->notes;
                 $order = app("OrderService")->first(["code"=>$waybill->wms_bill_number]);
                 if ($order)$waybill->order_id = $order->id;
             }

+ 4 - 2
resources/views/transport/waybill/index.blade.php

@@ -144,6 +144,7 @@
                             </div>@endcan
                         </div>
                     </td>
+                    <td class="td-cool"><span>@{{waybill.ordering_remark}}</span></td>
                     <td class="td-cool"><span>@{{waybill.recipient}}</span></td>
                     <td class="td-cool"><span>@{{waybill.recipient_mobile}}</span></td>
                     <td class="td-cool text-muted"><span>@{{waybill.origination}}</span></td>
@@ -433,6 +434,7 @@
                         {name:'other_charge',value: '其他收费', neglect: true, class:"td-warm"},
                         {name:'other_charge_remark',value: '其他收费备注', class:"td-warm"},
                             @can('运输管理-运单-图片上传'){name:'img',value: '照片', neglect: true, class:"td-warm"},@endcan
+                        {name:'ordering_remark',value: '运单备注', class:"td-cool"},
                         {name:'recipient',value: '收件人', class:"td-cool"},
                         {name:'recipient_mobile',value: '收件人电话', class:"td-cool"},
                         {name:'origination',value: '始发地', class:"td-cool"},
@@ -466,8 +468,8 @@
                         before : [
                             {colspan:'4',value: '', class:"table-header-layer-1"},
                             {colspan:'14',value: '运单信息',font:"fa fa-file-text-o", class:"table-header-layer-1"},
-                            {colspan:'16',value: '运输信息',font:"fa fa-truck", class:"table-header-layer-1"},
-                            {colspan:'5',value: '运输信息',font:"fa fa-rmb", class:"table-header-layer-1"},
+                            {colspan:'17',value: '运输信息',font:"fa fa-truck", class:"table-header-layer-1"},
+                            {colspan:'5',value: '收费信息',font:"fa fa-rmb", class:"table-header-layer-1"},
                                 @can('运输管理-运单-删除'){colspan:'1',value: '',font:"", class:"table-header-layer-1"},@endcan
                         ],
                     }).init();