Ver código fonte

Merge branch 'master' into zengjun

# Conflicts:
#	app/Http/Controllers/TestController.php
ajun 5 anos atrás
pai
commit
79db955470
71 arquivos alterados com 1987 adições e 87304 exclusões
  1. 88 0
      app/Http/Controllers/CustomerBaseController.php
  2. 12 0
      app/Http/Controllers/CustomerController.php
  3. 88 0
      app/Http/Controllers/FeatureController.php
  4. 5 2
      app/Http/Controllers/InventoryController.php
  5. 1 1
      app/Http/Controllers/LogController.php
  6. 1 1
      app/Http/Controllers/OrderController.php
  7. 31 0
      app/Http/Controllers/PriceModelController.php
  8. 88 0
      app/Http/Controllers/ProcessMethodController.php
  9. 16 0
      app/Http/Controllers/RejectedController.php
  10. 10 3
      app/Http/Controllers/StoreCheckingReceiveController.php
  11. 5 4
      app/Http/Controllers/StoreController.php
  12. 33 39
      app/Http/Controllers/TestController.php
  13. 88 0
      app/Http/Controllers/UserOwnerGroupController.php
  14. 1 1
      app/Http/Controllers/WaybillController.php
  15. 6 6
      app/Http/Controllers/WaybillPriceModelsController.php
  16. 105 346
      app/Http/Controllers/api/thirdPart/flux/StoreController.php
  17. 1 1
      app/Http/Middleware/DecodingRequest.php
  18. 0 1
      app/LaborReport.php
  19. 28 9
      app/Services/AllInventoryService.php
  20. 34 0
      app/Services/InventoryService.php
  21. 1 0
      app/Services/RejectedService.php
  22. 1 0
      config/stores.php
  23. 21 1
      database/migrations/2020_10_20_134819_create_customers_table.php
  24. 12 3
      database/migrations/2020_10_26_165012_create_owner_fee_details_table.php
  25. 37 0
      database/migrations/2020_10_27_103741_create_owner_bill_reports_table.php
  26. 29 0
      database/migrations/2020_10_27_112348_add_rejecteds_authorities.php
  27. 38 0
      database/migrations/2020_10_27_142647_create_owner_storage_price_model_table.php
  28. 32 0
      database/migrations/2020_10_27_162056_add_column_unit_id_table_process_methods.php
  29. 36 0
      database/migrations/2020_10_27_175452_create_owner_price_operations_table.php
  30. 36 0
      database/migrations/2020_10_28_105613_create_owner_out_storage_rules_table.php
  31. 33 0
      database/migrations/2020_10_28_105639_create_owner_in_storage_rules_table.php
  32. 34 0
      database/migrations/2020_10_28_110936_create_features_table.php
  33. 0 329
      public/css/app.css
  34. 0 86492
      public/js/app.js
  35. 6 5
      resources/js/queryForm/queryForm.js
  36. 6 0
      resources/sass/layout.scss
  37. 104 0
      resources/views/customer/finance/billConfirmation.blade.php
  38. 120 0
      resources/views/customer/finance/instantBill.blade.php
  39. 18 0
      resources/views/customer/finance/menu.blade.php
  40. 1 1
      resources/views/customer/menu.blade.php
  41. 2 1
      resources/views/inventory/statement/changeInventory.blade.php
  42. 27 0
      resources/views/maintenance/customer/create.blade.php
  43. 23 0
      resources/views/maintenance/customer/index.blade.php
  44. 14 0
      resources/views/maintenance/customer/menu.blade.php
  45. 35 0
      resources/views/maintenance/feature/create.blade.php
  46. 24 0
      resources/views/maintenance/feature/index.blade.php
  47. 14 0
      resources/views/maintenance/feature/menu.blade.php
  48. 20 8
      resources/views/maintenance/menu.blade.php
  49. 18 0
      resources/views/maintenance/priceModel/menu.blade.php
  50. 174 0
      resources/views/maintenance/priceModel/operation/create.blade.php
  51. 58 0
      resources/views/maintenance/priceModel/operation/index.blade.php
  52. 15 0
      resources/views/maintenance/priceModel/operation/menu.blade.php
  53. 66 0
      resources/views/maintenance/priceModel/storage/create.blade.php
  54. 38 0
      resources/views/maintenance/priceModel/storage/index.blade.php
  55. 15 0
      resources/views/maintenance/priceModel/storage/menu.blade.php
  56. 2 11
      resources/views/maintenance/priceModel/waybillPriceModel/create.blade.php
  57. 2 13
      resources/views/maintenance/priceModel/waybillPriceModel/edit.blade.php
  58. 1 1
      resources/views/maintenance/priceModel/waybillPriceModel/import.blade.php
  59. 3 4
      resources/views/maintenance/priceModel/waybillPriceModel/index.blade.php
  60. 5 4
      resources/views/maintenance/priceModel/waybillPriceModel/menu.blade.php
  61. 37 0
      resources/views/maintenance/processMethod/create.blade.php
  62. 24 0
      resources/views/maintenance/processMethod/index.blade.php
  63. 14 0
      resources/views/maintenance/processMethod/menu.blade.php
  64. 2 1
      resources/views/maintenance/role/index.blade.php
  65. 24 0
      resources/views/maintenance/userOwnerGroup/create.blade.php
  66. 24 0
      resources/views/maintenance/userOwnerGroup/index.blade.php
  67. 14 0
      resources/views/maintenance/userOwnerGroup/menu.blade.php
  68. 48 10
      resources/views/rejected/search/general.blade.php
  69. 2 0
      resources/views/store/checkingReceive/show.blade.php
  70. 8 0
      resources/views/waybill/authorityMenu.blade.php
  71. 28 6
      routes/web.php

+ 88 - 0
app/Http/Controllers/CustomerBaseController.php

@@ -0,0 +1,88 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use Illuminate\Http\Response;
+use Illuminate\Support\Facades\Gate;
+
+class CustomerBaseController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return Response
+     */
+    public function index()
+    {
+        if(!Gate::allows('客户-查询')){ return redirect('denied');  }
+        return response()->view('maintenance.customer.index');
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return Response
+     */
+    public function create()
+    {
+        if(!Gate::allows('客户-录入')){ return redirect('denied');  }
+        return response()->view('maintenance.customer.create');
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 12 - 0
app/Http/Controllers/CustomerController.php

@@ -36,4 +36,16 @@ class CustomerController extends Controller
         if(!Gate::allows('客户管理-项目-面积')){ return redirect('denied');  }
         return response()->view('customer.project.area');
     }
+
+    public function financeInstantBill()
+    {
+        if(!Gate::allows('客户管理-财务-即时账单')){ return redirect('denied');  }
+        return response()->view('customer.finance.instantBill');
+    }
+
+    public function financeBillConfirmation()
+    {
+        if(!Gate::allows('客户管理-财务-账单确认')){ return redirect('denied');  }
+        return response()->view('customer.finance.billConfirmation');
+    }
 }

+ 88 - 0
app/Http/Controllers/FeatureController.php

@@ -0,0 +1,88 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use Illuminate\Http\Response;
+use Illuminate\Support\Facades\Gate;
+
+class FeatureController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return Response
+     */
+    public function index()
+    {
+        if(!Gate::allows('特征-查询')){ return redirect('denied');  }
+        return response()->view("maintenance.feature.index");
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return Response
+     */
+    public function create()
+    {
+        if(!Gate::allows('特征-录入')){ return redirect('denied');  }
+        return response()->view("maintenance.feature.create");
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 5 - 2
app/Http/Controllers/InventoryController.php

@@ -3,6 +3,7 @@
 namespace App\Http\Controllers;
 
 use App\OracleBasCustomer;
+use App\Owner;
 use App\Services\AllInventoryService;
 use App\Services\InventoryDailyLogService;
 use App\Services\InventoryService;
@@ -25,7 +26,8 @@ class InventoryController extends Controller
         if(!Gate::allows("库存管理-库存")){ return redirect(url('/'));  }
         $oracleActTransactingLogs=app('inventoryService')->paginate($request->input());
         $oracleActTransactingLogs=json_encode($oracleActTransactingLogs);
-        $owners=OracleBasCustomer::query()->select('customerid','descr_c')->where('customer_type','OW')->where('active_flag','Y')->get();
+//        $owners=OracleBasCustomer::query()->select('customerid','descr_c')->where('customer_type','OW')->where('active_flag','Y')->get();
+        $owners=Owner::filterAuthorities()->select(['code', 'name'])->get();
         $isTotalStock=false;
         $page = $request->page ?? 1;
         return view('inventory.statement.changeInventory',compact('oracleActTransactingLogs','page','owners','isTotalStock'));
@@ -38,7 +40,8 @@ class InventoryController extends Controller
         $service = app('allInventoryService');
         $oracleActTransactingLogs= $service->paginate($request->input());
         $oracleActTransactingLogs=json_encode($oracleActTransactingLogs);
-        $owners=OracleBasCustomer::query()->select('customerid','descr_c')->where('customer_type','OW')->where('active_flag','Y')->get();
+//        $owners=OracleBasCustomer::query()->select('customerid','descr_c')->where('customer_type','OW')->where('active_flag','Y')->get();
+        $owners=Owner::filterAuthorities()->select(['code', 'name'])->get();
         $isTotalStock=true;
         $page = $request->page ?? 1;
         return view('inventory.statement.changeInventory',compact('oracleActTransactingLogs','page','owners','isTotalStock'));

+ 1 - 1
app/Http/Controllers/LogController.php

@@ -65,7 +65,7 @@ class LogController extends Controller
         if ($request->has('created_at_end')) {
             $query->where('created_at', '<=', $request->created_at_end);
         }
-        $query->orderByDesc('created_at');
+        $query->orderByDesc('id');
         $logs = $query->paginate($request->paginate??50);
         return view('maintenance.log.index', ['logs' => $logs]);
     }

+ 1 - 1
app/Http/Controllers/OrderController.php

@@ -20,7 +20,7 @@ use Illuminate\Support\Facades\Http;
 class OrderController extends Controller
 {
     public function delivering(Request $request){
-        if(!Gate::allows('订单管理-查询')){ return redirect('denied');  }
+        if(!Gate::allows('订单管理-查询')){ return view('order/index');  }
         /** @var OrderService $orderService */
         $orderService = app('orderService');
         $request = $request->input();

+ 31 - 0
app/Http/Controllers/PriceModelController.php

@@ -0,0 +1,31 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Gate;
+
+class PriceModelController extends Controller
+{
+    public function storeIndex()
+    {
+        if(!Gate::allows('计费模型-仓储')){ return redirect('denied');  }
+        return response()->view('maintenance.priceModel.storage.index');
+    }
+
+    public function storeCreate()
+    {
+        if(!Gate::allows('计费模型-仓储-录入')){ return redirect('denied');  }
+        return response()->view('maintenance.priceModel.storage.create');
+    }
+
+    public function operationIndex(){
+        if(!Gate::allows('计费模型-作业-查询')){ return redirect('denied');  }
+        return response()->view('maintenance.priceModel.operation.index');
+    }
+
+    public function operationCreate(){
+        if(!Gate::allows('计费模型-作业-录入')){ return redirect('denied');  }
+        return response()->view('maintenance.priceModel.operation.create');
+    }
+}

+ 88 - 0
app/Http/Controllers/ProcessMethodController.php

@@ -0,0 +1,88 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use Illuminate\Http\Response;
+use Illuminate\Support\Facades\Gate;
+
+class ProcessMethodController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return Response
+     */
+    public function index()
+    {
+        if(!Gate::allows('作业类型-查询')){ return redirect('denied');  }
+        return response()->view("maintenance.processMethod.index");
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return Response
+     */
+    public function create()
+    {
+        if(!Gate::allows('作业类型-录入')){ return redirect('denied');  }
+        return response()->view("maintenance.processMethod.create");
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 16 - 0
app/Http/Controllers/RejectedController.php

@@ -505,4 +505,20 @@ class RejectedController extends Controller
         }
         return ['success'=>true,'rejectedBill' => $rejectedBill];
     }
+    public function changeRejectedBillRemark(Request $request){
+        if(!Gate::allows('退货管理-编辑备注')){return ['success'=>'false','fail_info'=>'没有权限'];}
+        $id= $request->input('id');
+        $remark = $request->input('remark');
+        if(is_null($id) ){
+            return ['success'=>false,'fail_info'=>'参数异常'];
+        }
+        $rejectedBill=RejectedBill::query()->updateOrCreate([
+            'id'=>$id,
+        ],[
+            'id'=>$id,
+            'remark'=>$remark
+        ]);
+        $this->log(__METHOD__,'添加或者修改退单备注'.__FUNCTION__,json_encode($request->toArray()),Auth::user()['id']);
+        return ['success'=>true,'status'=>$rejectedBill];
+    }
 }

+ 10 - 3
app/Http/Controllers/StoreCheckingReceiveController.php

@@ -393,8 +393,15 @@ class StoreCheckingReceiveController extends Controller
         $item = app('storeCheckingReceiveItemService')->find($id);
         if (!$item)return ['success'=>false, 'data'=>'被盘项不存在'];
         $params = ["counted_amount"=>$counted_amount];
-        if ($item->imported_amount)$params["imported_diff_amount"] = (int)$counted_amount - (int)$item->imported_amount;
-        if ($item->asn_amount)$params["asn_diff_amount"] = (int)$counted_amount - (int)$item->asn_diff_amount;
+        $data = [];
+        if ($item->imported_amount){
+            $params["imported_diff_amount"] = (int)$counted_amount - (int)$item->imported_amount;
+            $data["imported_diff_amount"] = $params["imported_diff_amount"];
+        }
+        if ($item->asn_amount){
+            $params["asn_diff_amount"] = (int)$counted_amount - (int)$item->asn_diff_amount;
+            $data["asn_diff_amount"] = $params["asn_diff_amount"];
+        }
         //修改差异状态
         if ($item->imported_amount || $item->asn_amount){
             $withs = ['storeCheckingReceiveItems'];
@@ -403,7 +410,7 @@ class StoreCheckingReceiveController extends Controller
         }
         app('storeCheckingReceiveItemService')->updateFind($item,$params);
         LogService::log(__METHOD__,"盘点修改实盘数",'item:'.json_encode($item)."update:",$counted_amount);
-        return ['success'=>true];
+        return ['success'=>true,"data"=>$data];
     }
 
     //修改差异状态

+ 5 - 4
app/Http/Controllers/StoreController.php

@@ -146,7 +146,7 @@ class StoreController extends Controller
             'depository_code'=>$depository_code,
             'follow_code'=>$store['id'],
         ]);
-        if ($result["success"]){
+        if ($result){
             $store->status='已入库';
             $store->save();
             if ($store->storeItems){
@@ -196,21 +196,22 @@ class StoreController extends Controller
                 LogService::log(__METHOD__,"快速入库-FLUX收货失败","ASNNO:".$asnno.";ERROR:".$result);
                 return ['success' => false, 'data' => $detail->asnlineno.'收货失败,错误代码:'.$result];
             }
-            if (!isset($depositories[$detail->lotatt05])){
+            if (!isset($depositories[$detail->lotatt05]) && $detail->lotatt05){
                 $depository = app('depositoryService')->firstOrCreate(["code"=>$detail->lotatt05],["code"=>$detail->lotatt05,"name"=>$detail->lotatt05]);
                 $depositories[$detail->lotatt05] = $depository->id;
             }
-            $items[] = [
+            $item = [
                 "asn_line_code" => $detail->asnlineno,
                 "name" => $detail->skudescrc,
                 "sku" => $detail->sku,
                 "barcode" => $detail->alternate_sku1,
-                "depository_id" => $depositories[$detail->lotatt05],
                 "amount" => $detail->expectedqty_each,
                 "quality" => $quality == 'ZP' ? '正品' : '残次',
                 "status" => "已入库",
                 "created_at" => $toDay
             ];
+            if (isset($depositories[$detail->lotatt05]))$item["depository_id"] = $depositories[$detail->lotatt05];
+            $items[] = $item;
         }
         oci_close($conn);
         $warehouse = app('warehouseService')->firstOrCreate(["code"=>$asn->warehouseid],["code"=>$asn->warehouseid,"name"=>$asn->warehouseid]);

+ 33 - 39
app/Http/Controllers/TestController.php

@@ -85,7 +85,6 @@ class TestController extends Controller
     {
         return call_user_func([$this, $method], $request);
     }
-
     /*dd('IN_Warehouse:'.$doc_asn_detail->warehouseid,
                      'In_ASNNo_C:'.$doc_asn_detail->docno,
                      'In_ASNLineNo_C:'.$doc_asn_detail->asnlineno,
@@ -110,24 +109,21 @@ class TestController extends Controller
                      'In_UserID:'.$doc_asn_detail->addwho,
                      'OUT_Return_Code:'.$result
                  );*/
-    public function test4()
-    {
-        $r = Redis::connection();
-        $controller = new \App\Http\Controllers\Api\thirdPart\flux\StoreController();
-        return $controller->quickStorage('JSCS202010210001');
+    public function test4(){
+        if (array_search("CGRK",array_values(config('stores.types'))) === false)return ['success'=>false, 'data'=>"该单据类型不允许被入库"];
+        return "SUCCESS";
     }
 
-    public function test2()
-    {
+    public function test2(){
         $db = DB::connection('oracle');
         $db->beginTransaction();
-        try {
+        try{
             $bas = $db->select("SELECT * FROM BAS_CODES where codeid = 'IVC_STS' and code = '00'");
             foreach ($bas as $a) {
                 $row = $db->update(DB::raw("UPDATE BAS_CODES set codename_c = '创建' WHERE codeid = ? and code = ?"), [$a->codeid, $a->code]);
                 if ($row > 0) $db->commit();
             }
-        } catch (\Exception $e) {
+        }catch (\Exception $e){
             $db->rollBack();
         }
     }
@@ -485,57 +481,56 @@ class TestController extends Controller
         }
     }
 
-    public function test5()
-    {
-        ini_set('max_execution_time', 2500);
-        ini_set('memory_limit', '1526M');
+    public function test5(){
+        ini_set('max_execution_time',2500);
+        ini_set('memory_limit','1526M');
         //清理冗余条码
 //        $this->cleanBarcode();
 
-        while (true) {
+        while(true){
             $toDay = Carbon::now();
             $skus = DB::select(DB::raw('select sku from commodities group by sku,owner_id having count(*)>1 limit 500 '));
-            $skus = array_column($skus, 'sku');
+            $skus = array_column($skus,'sku');
 
-            $commodities = Commodity::query()->with('barcodes')->whereNotNull('owner_id')->whereIn('sku', $skus)->get();
+            $commodities = Commodity::query()->with('barcodes')->whereNotNull('owner_id')->whereIn('sku',$skus)->get();
 
 
-            if (count($commodities) < 1) return "SUCCESS";
+            if (count($commodities) < 1)return "SUCCESS";
             $commodityMap = [];
             $commodityDel = [];
             $commodityTag = [];
             $commodityBar = [];
             $createBarcodes = [];
             $logs = [];
-            foreach ($commodities as $commodity) {
-                if ($commodityMap[$commodity->sku . '_' . $commodity->owner_id] ?? false) {
-                    $codes = $commodity->barcodes ? array_column($commodity->barcodes->toArray(), 'code') : [];
+            foreach ($commodities as $commodity){
+                if ($commodityMap[$commodity->sku.'_'.$commodity->owner_id] ?? false){
+                    $codes = $commodity->barcodes ? array_column($commodity->barcodes->toArray(),'code') : [];
                     $logs[] = [
                         'id' => $commodity->id,
                         'sku' => $commodity->sku,
-                        'owner_id' => $commodity->owner_id,
-                        'code' => $codes,
+                        'owner_id'=>$commodity->owner_id,
+                        'code'=>$codes,
                     ];
                     $commodityDel[] = $commodity->id;
-                    $commodityTag[$commodity->id] = $commodityMap[$commodity->sku . '_' . $commodity->owner_id];
+                    $commodityTag[$commodity->id] = $commodityMap[$commodity->sku.'_'.$commodity->owner_id];
 
-                    $arr = array_diff($codes, $commodityBar[$commodity->sku . '_' . $commodity->owner_id]);
-                    foreach ($arr as $code) {
-                        if (!$code) continue;
+                    $arr = array_diff($codes,$commodityBar[$commodity->sku.'_'.$commodity->owner_id]);
+                    foreach ($arr as $code){
+                        if (!$code)continue;
                         $createBarcodes[] = [
                             'code' => $code,
-                            'commodity_id' => $commodityMap[$commodity->sku . '_' . $commodity->owner_id],
+                            'commodity_id' => $commodityMap[$commodity->sku.'_'.$commodity->owner_id],
                             'created_at' => $toDay,
                         ];
                     }
-                } else {
-                    $commodityMap[$commodity->sku . '_' . $commodity->owner_id] = $commodity->id;
-                    $commodityBar[$commodity->sku . '_' . $commodity->owner_id] = $commodity->barcodes ? array_column($commodity->barcodes->toArray(), 'code') : [];
+                }else{
+                    $commodityMap[$commodity->sku.'_'.$commodity->owner_id] = $commodity->id;
+                    $commodityBar[$commodity->sku.'_'.$commodity->owner_id] = $commodity->barcodes ? array_column($commodity->barcodes->toArray(),'code') : [];
                 }
             }
-            dd($commodityMap, $commodityDel, $commodityTag);
-            LogService::log(__METHOD__, '清理商品', json_encode($logs, JSON_UNESCAPED_UNICODE));
-            LogService::log(__METHOD__, '重新分配商品', json_encode($commodityTag, JSON_UNESCAPED_UNICODE));
+            dd($commodityMap,$commodityDel,$commodityTag);
+            LogService::log(__METHOD__,'清理商品',json_encode($logs,JSON_UNESCAPED_UNICODE));
+            LogService::log(__METHOD__,'重新分配商品',json_encode($commodityTag,JSON_UNESCAPED_UNICODE));
 
             app('inventoryAccountMissionService')->batchUpdateItself('commodity_id', $commodityTag);//批量更新库存盘点任务
             app('inventoryCompareService')->batchUpdateItself('commodity_id', $commodityTag);//批量更新库存对比
@@ -544,14 +539,13 @@ class TestController extends Controller
             app('storeCheckingReceiveItemService')->batchUpdateItself('commodity_id', $commodityTag);//批量更新入库盘收一体
             app('orderPackageCommoditiesService')->batchUpdateItself('commodity_id', $commodityTag);//批量更新订单商品
 
-            LogService::log(__METHOD__, '删除商品与对应条码', json_encode($commodityDel, JSON_UNESCAPED_UNICODE));
-            CommodityBarcode::query()->whereIn('commodity_id', $commodityDel)->delete();
+            LogService::log(__METHOD__,'删除商品与对应条码',json_encode($commodityDel,JSON_UNESCAPED_UNICODE));
+            CommodityBarcode::query()->whereIn('commodity_id',$commodityDel)->delete();
             Commodity::destroy($commodityDel);
         }
     }
 
-    private function cleanBarcode()
-    {
+    private function cleanBarcode(){
 
         $logCommodityBarcodes = CommodityBarcode::query()->where('code', "")->get();
         if (count($logCommodityBarcodes) > 0) LogService::log(__METHOD__, "纠正商品-删除空条码", json_encode($logCommodityBarcodes, JSON_UNESCAPED_UNICODE));
@@ -636,7 +630,7 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
             }
             $updateCommodities[$del->commodity_id] = $target->commodity_id;
         }
-        if (count($updateCommodities) > 0) {
+        if (count($updateCommodities) > 0){
             app('inventoryAccountMissionService')->batchUpdateItself('commodity_id', $updateCommodities);//批量更新库存盘点任务
             app('inventoryCompareService')->batchUpdateItself('commodity_id', $updateCommodities);//批量更新库存对比
             app('inventoryDailyLogService')->batchUpdateItself('commodity_id', $updateCommodities);//批量更新库存每日记录

+ 88 - 0
app/Http/Controllers/UserOwnerGroupController.php

@@ -0,0 +1,88 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use Illuminate\Http\Response;
+use Illuminate\Support\Facades\Gate;
+
+class UserOwnerGroupController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return Response
+     */
+    public function index()
+    {
+        if(!Gate::allows('项目组-查询')){ return redirect('denied');  }
+        return response()->view("maintenance.userOwnerGroup.index");
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return Response
+     */
+    public function create()
+    {
+        if(!Gate::allows('项目组-录入')){ return redirect('denied');  }
+        return response()->view("maintenance.userOwnerGroup.create");
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function show($id)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function edit($id)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, $id)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  int  $id
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy($id)
+    {
+        //
+    }
+}

+ 1 - 1
app/Http/Controllers/WaybillController.php

@@ -48,7 +48,7 @@ class WaybillController extends Controller
      */
     public function index(Request $request,OwnerService $ownerService,CarrierService $carrierService)
     {
-        if(!Gate::allows('运输管理-查询')){ return redirect(url('/'));  }
+        if(!Gate::allows('运输管理-查询')){ return view("waybill.authorityMenu");  }
         $paginateParams = $request->input();
         $waybills=app('waybillService')->paginate($request->input());
         return view('waybill.index', [

+ 6 - 6
app/Http/Controllers/WaybillPriceModelsController.php

@@ -34,10 +34,10 @@ class WaybillPriceModelsController extends Controller
                 $waybillPriceModels=$waybillPriceModels->where('province_id',$request->input('province_id'));
             }
             $waybillPriceModels=$waybillPriceModels->paginate($request->input('paginate')?$request->input('paginate'):50);
-            return view('maintenance.waybillPriceModel.index',['waybillPriceModels'=>$waybillPriceModels,'carriers'=>$carriers,'provinces'=>$provinces,'filterData'=>$data]);
+            return view('maintenance.priceModel.waybillPriceModel.index',['waybillPriceModels'=>$waybillPriceModels,'carriers'=>$carriers,'provinces'=>$provinces,'filterData'=>$data]);
         }else{
             $waybillPriceModels= $waybillPriceModels->paginate(50);
-            return view('maintenance.waybillPriceModel.index',['waybillPriceModels'=>$waybillPriceModels,'carriers'=>$carriers,'provinces'=>$provinces,'filterData'=>$data]);
+            return view('maintenance.priceModel.waybillPriceModel.index',['waybillPriceModels'=>$waybillPriceModels,'carriers'=>$carriers,'provinces'=>$provinces,'filterData'=>$data]);
         }
     }
 
@@ -48,7 +48,7 @@ class WaybillPriceModelsController extends Controller
         $carriers=Carrier::get();
         $provinces=Province::get();
         $units=Unit::get();
-        return view('maintenance.waybillPriceModel.create',['carriers'=>$carriers,'provinces'=>$provinces,'units'=>$units]);
+        return view('maintenance.priceModel.waybillPriceModel.create',['carriers'=>$carriers,'provinces'=>$provinces,'units'=>$units]);
     }
 
     public function getCities($province_id){
@@ -90,7 +90,7 @@ class WaybillPriceModelsController extends Controller
             $waybillPriceModel=WaybillPriceModel::create($waybillPriceModel);
             event(new WaybillPriceModelEvent($waybillPriceModel));
             $this->log(__METHOD__,__FUNCTION__,json_encode($request->toArray()),Auth::user()['id']);
-            return redirect('maintenance/waybillPriceModel')->with('successTip','新计费模型录入成功');
+            return redirect('maintenance/priceModel/waybillPriceModel')->with('successTip','新计费模型录入成功');
         }else{
             return redirect()->back()->with('successTip','该计费模型已存在');
         }
@@ -106,7 +106,7 @@ class WaybillPriceModelsController extends Controller
         $provinces=Province::get();
         $cities=City::where('province_id',$waybillPriceModel->province_id)->get();
         $units=Unit::get();
-        return view('maintenance.waybillPriceModel.edit',['waybillPriceModel'=>$waybillPriceModel,'carriers'=>$carriers,'provinces'=>$provinces,'units'=>$units,'cities'=>$cities]);
+        return view('maintenance.priceModel.waybillPriceModel.edit',['waybillPriceModel'=>$waybillPriceModel,'carriers'=>$carriers,'provinces'=>$provinces,'units'=>$units,'cities'=>$cities]);
     }
 
 
@@ -122,7 +122,7 @@ class WaybillPriceModelsController extends Controller
         if ($waybillPriceModel->save()){
             event(new WaybillPriceModelEvent($waybillPriceModel));
             $this->log(__METHOD__,__FUNCTION__,json_encode($request->toArray()),Auth::user()['id']);
-            return redirect('maintenance/waybillPriceModel')->with('successTip','新计费模型修改成功');
+            return redirect('maintenance/priceModel/waybillPriceModel')->with('successTip','新计费模型修改成功');
         }
     }
 

+ 105 - 346
app/Http/Controllers/api/thirdPart/flux/StoreController.php

@@ -1,370 +1,129 @@
 <?php
 
-namespace App\Http\Controllers;
+namespace App\Http\Controllers\Api\thirdPart\flux;
 
-use App\Depository;
-use App\Owner;
-use App\Services\LogService;
+use App\Http\Controllers\Controller;
 use App\Store;
-use App\StoreItems;
-use App\Warehouse;
 use App\WMSReflectReceive;
-use Carbon\Carbon;
-use Illuminate\Contracts\Foundation\Application;
-use Illuminate\Contracts\View\Factory;
-use Illuminate\Http\RedirectResponse;
-use Illuminate\Http\Request;
-use Illuminate\Http\Response;
-use Illuminate\Routing\Redirector;
-use Illuminate\Support\Facades\DB;
-use Illuminate\Support\Facades\Gate;
-use Illuminate\Support\Facades\Validator;
-use Illuminate\View\View;
-use App\Http\Controllers\Api\thirdPart\flux\StoreController as FStoreController;
+use App\WMSReflectReceiveSku;
+use Zttp\Zttp;
 
 class StoreController extends Controller
 {
-    /**
-     * Display a listing of the resource.
-     *
-     * @return Application|Factory|Response|View
-     */
-    public function index()
-    {
-        if(!Gate::allows('入库管理-快速入库-查询')){ return redirect(url('/'));  }
-        $stores=Store::orderBy('id','DESC')->paginate(50);
-        return view('store.fast.index',['stores'=>$stores]);
-    }
 
-    /**
-     * Show the form for creating a new resource.
-     *
-     * @return Application|Factory|Response|View
-     */
-    public function create()
-    {
-        if(!Gate::allows('入库管理-快速入库-录入')){ return redirect(url('/'));  }
-        return view('store.fast.create');
-    }
 
     /**
-     * Store a newly created resource in storage.
-     *
-     * @param Request $request
-     * @return RedirectResponse|Response|Redirector
+     * 入库回传给WMS
+     * @param Store $store
+     * @return bool
      */
-    public function store(Request $request)
+    public function accomplishToWMS(Store $store, array $inputs)
     {
-        if(!Gate::allows('入库管理-快速入库-录入')){ return redirect(url('/'));  }
-        $this->validator($request);
-        if ($request->test)$result = $this->quickStorage($request->input('asn_code'),$request->input('quality') == '正品' ? 'ZP' : 'CC',$request->input('depository_code'));
-        else $result = $this->quickStorage_temp($request->input('asn_code'),$request->input('quality'),$request->input('depository_code'));
-        $response = redirect('store/fast/create');
-        if ($result['success'])return redirect('store/fast/create')->with('successTip',$result['data']);
-        return $response->with('successError',$result['data']);
-    }
-
-    public function quickStorage_temp($asn,$quality,$depository_code){
-        $WMSReflectReceive=WMSReflectReceive::with('skus')->where('ASNNO',$asn)->first();
-        if (!$WMSReflectReceive)return ['success'=>false, 'data'=>"ASN编号不存在!"];
-        $warehouse=Warehouse::query()->where('code',$WMSReflectReceive->WAREHOUSEID)->first();
-        if (!$warehouse&&$WMSReflectReceive->WAREHOUSEID){
-            $warehouse=new Warehouse([
-                'name'=>$WMSReflectReceive->WAREHOUSEID,
-                'code'=>$WMSReflectReceive->WAREHOUSEID
-            ]);
-            $warehouse->save();
-        }
-        $owner=Owner::query()->where('code',$WMSReflectReceive->CUSTOMERID)->first();
-        if (!$owner&&$WMSReflectReceive->CUSTOMERID){
-            $owner=new Owner([
-                'name'=>$WMSReflectReceive->CUSTOMERID,
-                'code'=>$WMSReflectReceive->CUSTOMERID
-            ]);
-            $owner->save();
+        $METHOD = __METHOD__;
+        $FUNCTION = __FUNCTION__;
+        Controller::logS(__METHOD__, __FUNCTION__, '快递入库进入WMS接口:' . $store['asn_code']);
+        $wmsReceiveds = WMSReflectReceive::query()->where('ASNNO', $store['asn_code'])->get();
+        if ($wmsReceiveds->isEmpty()) {
+            (new Controller())->log(__METHOD__, 'error_' . __FUNCTION__, '没有本地WMS入库单');
+            return false;
         }
-        $store=Store::query()->where('asn_code',$WMSReflectReceive->ASNNO)->first();
-        if(!$store){
-            $store=new Store([
-                'asn_code'=>$WMSReflectReceive->ASNNO,
-                'warehouse_id'=>$warehouse->id,
-                'owner_id'=>$owner->id,
-                'stored_method'=>'快速入库',
-                'status'=>'未入库',
-                'remark'=>$WMSReflectReceive->NOTES,
-            ]);
-            $store->save();
+        $success = true;
+        $wmsReceiveds->each(function ($wmsReceived) use (&$store, &$amountsItem, &$success, &$inputs, $METHOD, $FUNCTION) {
 
-            $customDepository=(function()use($depository_code){
-                $customDepository=Depository::query()->where('code',$depository_code)->first();
-                if($depository_code){
-                    if (!$customDepository){
-                        $depository=new Depository([
-                            'name'=>$depository_code,
-                            'code'=>$depository_code
-                        ]);
-                        $depository->save();
-                    }
-                }
-                return $customDepository;
+            $wmsSkus = $wmsReceived->skus()->get();
+            $orderNumberCode = $wmsReceived['ASNREFERENCE1'] ?? $store['order_number'];
+            $amountsSku = (function () use ($wmsSkus) {
+                $result = [];
+                $wmsSkus->each(function ($sku) use (&$result) {
+                    $result[$sku['id']] = $sku['EXPECTEDQTY_EACH'];
+                });
+                return $result;
             })();
-
-            if ($WMSReflectReceive->skus){
-                foreach ($WMSReflectReceive->skus as $sku){
-                    $depository=(function()use($sku,$customDepository){
-                        if($customDepository)return $customDepository;
-                        $depository=Depository::query()->where('code',$sku->LOTATT05)->first();
-                        if (!$depository){
-                            if (!$sku->LOTATT05)return $depository;
-                            $depository=new Depository([
-                                'name'=>$sku->LOTATT05,
-                                'code'=>$sku->LOTATT05
-                            ]);
-                            $depository->save();
+            $skuStrList = [];
+            $customerCode = $store->owner()->first()['code'];
+            $wmsSkus->each(function (WMSReflectReceiveSku $sku) use (&$skuList, &$amountsItem, &$amountsSku, &$skuStrList, $wmsReceived, $customerCode, &$inputs) {
+                $STATUS = 'ZP';
+                if (isset($inputs['quality']) && $inputs['quality']
+                    && $inputs['quality'] != '正品') {
+                    $STATUS = 'CC';
+                }
+                $repositoryCode = $sku['LOTATT05'];
+                if (isset($inputs['depository_code']) && $inputs['depository_code']) {
+                    $repositoryCode = $inputs['depository_code'];
+                }
+                $skuStr = "
+                        {
+                            \"ORDERNUMBERCODE\": \"{$wmsReceived['ASNNO']}\",
+                            \"ASNLINENO\": \"{$sku['ASNLINENO']}\",
+                            \"SKUCODE\": \"{$sku['SKU']}\",
+                            \"QUANTITY\": \"{$sku['EXPECTEDQTY_EACH']}\",
+                            \"LOTATT04\": \"{$sku['LOTATT04']}\",
+                            \"LOTATT05\": \"{$repositoryCode}\",
+                            \"STATUS\": \"{$STATUS}\",
+                            \"USERDEFINE1\": \"{$inputs['follow_code']}\",
+                            \"USERDEFINE2\": \"\",
+                            \"USERDEFINE3\": \"\",
+                            \"UNIQUE_CODE_LIST\": [" .
+                    "]
                         }
-                        return $depository;
-                    })();
-                    $storeItem=new StoreItems([
-                        'store_id'=>$store->id,
-                        'asn_line_code'=>$sku->ASNLINENO,
-                        'name'=>$sku->SKUDESCRC,
-                        'sku'=>$sku->SKU,
-                        'barcode'=>$sku->ALTERNATE_SKU1,
-                        'quality'=>$quality,
-                        'status'=>'未入库',
-                    ]);
-                    if ($depository)$storeItem->depository_id=$depository->id;
-                    $storeItem->save();
+                    ";
+                $skuStrList[] = $skuStr;
+            });
+            $skuStrList = implode(',', $skuStrList);
+            $json = "
+                {
+                    \"request\": [
+                        {
+                            \"ORDERNUMBERCODE\": \"{$wmsReceived['ASNNO']}\",
+                            \"CUSTOMERID\": \"{$wmsReceived['CUSTOMERID']}\",
+                            \"ASNTYPE\": \"{$wmsReceived['ASNTYPE']}\",
+                            \"ASNREFERENCE1\": \"{$wmsReceived['ASNREFERENCE1']}\",
+                            \"ADDWHO\": \"WCS\",
+                            \"USERDEFINE1\": \"\",
+                            \"USERDEFINE2\": \"\",
+                            \"USERDEFINE3\": \"\",
+                            \"SKU_LIST\": [{$skuStrList}]
+                        }
+                    ]
                 }
-            }
-        }
-        /** @var Store $store */
-        $store=Store::with('storeItems')->where('asn_code',$asn)->first();
-        $storeApi=new FStoreController();
-        $result=$storeApi->accomplishToWMS($store,[
-            'quality'=>$quality,
-            'depository_code'=>$depository_code,
-            'follow_code'=>$store['id'],
-        ]);
-        if ($result){
-            $store->status='已入库';
-            $store->save();
-            if ($store->storeItems){
-                $store->storeItems->each(function ($storeItem)use($quality){
-                    $storeItem->status='已入库';
-                    $storeItem->quality=$quality;
-                    $storeItem->save();
-                });
-            }
-            return ['success'=>true, 'data'=>"成功!"];
-        }
-        return ['success'=>false, 'data'=>"失败!请检查错误日志"];
-    }
+        ";
 
-    public function quickStorage($asnno,$quality,$depository_code)
-    {
-        $db = DB::connection('oracle');
-        $query = DB::raw("SELECT * FROM DOC_ASN_HEADER WHERE ASNNO = ?");
-        $asn = $db->selectOne($query,[$asnno]);
-        if (!$asn) return ['success'=>false, 'data'=>"单据号不存在"];
-        if ($asn->asnstatus != '00')return ['success'=>false, 'data'=>'单据号状态非创建订单'];
-        if (array_search($asn->customerid,array_values(config('stores.owners'))) === false)return ['success'=>false, 'data'=>"不允许该货主快速入库"];
-        if (array_search($asn->asntype,array_values(config('stores.types'))) === false)return ['success'=>false, 'data'=>"该单据类型不允许被入库"];
-        $query = DB::raw("SELECT b.ALTERNATE_SKU1,h.WAREHOUSEID,h.asnno,d.ASNLINENO,d.SKUDESCRC,h.CUSTOMERID,d.SKU,d.PACKID,d.RECEIVEDQTY_EACH,d.EXPECTEDQTY_EACH,d.LOTATT01,d.LOTATT02,d.lotatt04,".
-            "d.lotatt05,d.lotatt08,d.USERDEFINE1,d.USERDEFINE2,d.USERDEFINE3,d.USERDEFINE4,d.USERDEFINE5,d.RECEIVINGLOCATION FROM DOC_ASN_DETAILS d ".
-            " LEFT JOIN BAS_SKU b ON d.CUSTOMERID = b.CUSTOMERID AND d.SKU = b.SKU INNER JOIN DOC_ASN_HEADER h ON d.ASNNO = h.ASNNO WHERE h.ASNNO = ?");
-        $details = $db->select($query,[$asnno]);
-
-        $username = config('database.connections.oracle.username');
-        $password = config('database.connections.oracle.password');
-        $host = config('database.connections.oracle.host');
-        $service_name = config('database.connections.oracle.service_name');
-        $conn = oci_connect($username, $password, $host . '/' . $service_name,"utf8");
-        $sql_sp = "begin SPASN_Receiving_Process(:IN_Warehouse, :In_Process_Action, :In_ASNNo_C, :In_ASNLineNo_C, :In_FMTraceID_C, :In_New_TraceID_C, :In_ProductStatus," .
-            ":In_ProductStatus_Descr, :In_HoldRejectCode_C, :In_HoldRejectReason_C, :In_PONo_C, :In_CustomerID, :In_SKU, :In_ReceivedQty, :In_RejectedQty,:In_UOM, :In_PackID," .
-            " :In_ContainerID, :In_LotAtt01_C, :In_LotAtt02_C, :In_LotAtt03_C, :In_LotAtt04_C, :In_LotAtt05_C, :In_LotAtt06_C," .
-            ":In_LotAtt07_C, :In_LotAtt08_C, :In_LotAtt09_C, :In_LotAtt10_C, :In_LotAtt11_C, :In_LotAtt12_C," .
-            ":In_TotalCubic, :In_TotalGrossWeight, :In_TotalNetWeight, :In_TotalPrice, :In_UserDefine1, :In_UserDefine2,:In_UserDefine3, :In_UserDefine4, :In_UserDefine5, :In_FMLocation," .
-            ":In_TOLocation_C,:In_QC_Type_C, :In_PlanToLoc_C,:In_ReceivingTime, :In_LPN, :In_Operator, :IN_RCVModule, :IN_RCVStation, :In_Language, :In_UserID, :OUT_Return_Code); end;";
-        $items = [];
-        $toDay = Carbon::now()->toDateTimeString();
-        $depositories = [];
-        foreach ($details as $detail) {
-            $result = $this->executeSP($detail,$asnno,$depository_code,$db,$quality,$conn,$sql_sp);
-            if (substr($result, 0, 3) != '000') {
-                oci_close($conn);
-                LogService::log(__METHOD__,"快速入库-FLUX收货失败","ASNNO:".$asnno.";ERROR:".$result);
-                return ['success' => false, 'data' => $detail->asnlineno.'收货失败,错误代码:'.$result];
+            $sendingJson = json_decode($json, true);
+            $url = url(config('api.flux.receive.new'));
+//            (new Controller())->log($METHOD,$FUNCTION,$store['asn_code'].'||' .json_encode($sendingJson));
+            Controller::logS(__METHOD__, __FUNCTION__, '快递入库请求WMS接口开始:' . $store['asn_code']);
+            $response = Zttp::post($url, $sendingJson);
+            Controller::logS(__METHOD__, __FUNCTION__, '快递入库请求WMS接口结束:' . $store['asn_code'] . '||' . $response->body());
+            $noIssues = true;
+            $json = $response->json();
+            if (!$json || !isset($json['Response']) || !$json['Response']['return']['returnFlag'] == '1') {
+                $noIssues = false;
+            }
+            if ($json && isset($json['Response'])) {
+                if ($json['Response']['return']['returnFlag'] == '2') {
+                    (new Controller())->log($METHOD, 'error_' . $FUNCTION, $store['asn_code'] . '||' . $response->body());
+                    return true;
+                }
+//                if(isset($json['Response']['return']['returnDesc'])&&strpos($json['Response']['return']['returnDesc'],'唯一约束')!==false){
+//                    (new Controller())->log($METHOD,'error_'.$FUNCTION,$response->body());
+//                    return true;
+//                }
+                if (isset($json['Response']['return']['errordescr']) && strpos($json['Response']['return']['errordescr'], '已完成') !== false) {
+                    (new Controller())->log($METHOD, 'error_' . $FUNCTION, $store['asn_code'] . '||' . $response->body());
+                    return true;
+                }
             }
-            if (!isset($depositories[$detail->lotatt05])){
-                $depository = app('depositoryService')->firstOrCreate(["code"=>$detail->lotatt05],["code"=>$detail->lotatt05,"name"=>$detail->lotatt05]);
-                $depositories[$detail->lotatt05] = $depository->id;
+            if ($noIssues && $json['Response']['return']['returnFlag'] == '1') {
+                $wmsReceived['is_uploaded'] = 1;
+                $wmsReceived->save();
+                (new Controller())->log($METHOD, 'success_' . $FUNCTION, $store['asn_code'] . '||' . $response->body());
+                return true;
+            } else {
+                $success = false;
+                (new Controller())->log($METHOD, 'error_' . $FUNCTION, $store['asn_code'] . '||' . $response->body());
             }
-            $items[] = [
-                "asn_line_code" => $detail->asnlineno,
-                "name" => $detail->skudescrc,
-                "sku" => $detail->sku,
-                "barcode" => $detail->alternate_sku1,
-                "depository_id" => $depositories[$detail->lotatt05],
-                "amount" => $detail->expectedqty_each,
-                "quality" => $quality == 'ZP' ? '正品' : '残次',
-                "status" => "已入库",
-                "created_at" => $toDay
-            ];
-        }
-        oci_close($conn);
-        $warehouse = app('warehouseService')->firstOrCreate(["code"=>$asn->warehouseid],["code"=>$asn->warehouseid,"name"=>$asn->warehouseid]);
-        $owner = app('ownerService')->firstOrCreate(['code'=>$asn->customerid],['code'=>$asn->customerid,"name"=>$asn->customerid]);
-        $store = app('storeService')->create([
-            'asn_code'=>$asnno,
-            'warehouse_id'=>$warehouse->id,
-            'owner_id'=>$owner->id,
-            'stored_method'=>'快速入库',
-            'status'=>'已入库',
-            'remark'=>$asn->notes,
-        ]);
-        LogService::log(__METHOD__,"快速入库",json_encode($store));
-        foreach ($items as $item){
-            $item["store_id"] = $store->id;
-        }
-        app('storeItemService')->insert($items);
-        return ['success'=>true,"data"=>"已成功将“".$asnno."”入库"];
-    }
-
-    private function executeSP($detail, $asnno, $depository_code, $db, $quality, $conn, $sql_sp){
-        $IN_Warehouse = $detail->warehouseid ?? '';
-        $In_Process_Action = '3';
-        $In_ASNNo_C = $detail->asnno ?? '';
-        $In_ASNLineNo_C = $detail->asnlineno ?? '';
-        $In_FMTraceID_C = '';
-        $In_New_TraceID_C = '';
-        $In_ProductStatus = '00';
-        $In_ProductStatus_Descr = '正常';
-        $In_HoldRejectCode_C = 'OK';
-        $In_HoldRejectReason_C = '正常';
-        $In_PONo_C = '';
-        $In_CustomerID = $detail->customerid ?? '';
-        $In_SKU = $detail->sku ?? '';
-        $In_ReceivedQty = (string)((int)$detail->expectedqty_each - (int)$detail->receivedqty_each) ?? '';
-        $In_RejectedQty = '';
-        $In_UOM = 'EA';
-        $In_PackID = $detail->packid ?? '';
-        $In_ContainerID = '';
-        $In_LotAtt01_C = $detail->lotatt01 ?? '';
-        $In_LotAtt02_C = $detail->lotatt02 ?? '';
-        $In_LotAtt03_C = '';
-        $In_LotAtt04_C = $detail->lotatt04 ?? '';
-        $In_LotAtt05_C = $detail->lotatt05 ?? '';
-        $In_LotAtt06_C = '';
-        $In_LotAtt07_C = '';
-        $In_LotAtt08_C = $detail->lotatt08 ?? '';
-        $In_LotAtt09_C = '';
-        $In_LotAtt10_C = '';
-        $In_LotAtt11_C = '';
-        $In_LotAtt12_C = '';
-        $In_TotalCubic = '0.00';
-        $In_TotalGrossWeight = '0.00';
-        $In_TotalNetWeight = '0.00';
-        $In_TotalPrice = '0.00';
-        $In_UserDefine1 = $detail->userdefine1 ?? '';
-        $In_UserDefine2 = $detail->userdefine2 ?? '';
-        $In_UserDefine3 = $detail->userdefine3 ?? '';
-        $In_UserDefine4 = $detail->userdefine4 ?? '';
-        $In_UserDefine5 = $detail->userdefine5 ?? '';
-        $In_FMLocation = 'STAGE' . $detail->warehouseid;
-        $In_TOLocation_C = 'STAGE' . $detail->warehouseid;
-        $In_QC_Type_C = 'OK';
-        $In_PlanToLoc_C = '';
-        $In_ReceivingTime = '';
-        $In_LPN = '*';
-        $In_Operator = 'WCS';
-        $IN_RCVModule = '';
-        $IN_RCVStation = '';
-        $In_Language = 'cn';
-        $In_UserID = 'WCS';
-        $result = '';
-        if ($depository_code && (strtoupper($depository_code) != strtoupper($detail->receivinglocation))){
-            $query = DB::raw("UPDATE DOC_ASN_DETAILS SET RECEIVINGLOCATION = ?  WHERE ASNNO = ? AND ASNLINENO = ?");
-            $db->update($query,[$depository_code,$detail->asnno,$detail->asnlineno]);
-            $db->commit();
-            LogService::log(__METHOD__,"快速入库-修改FULX属性仓","ASNNO:".$asnno.";原仓:".$detail->receivinglocation.";修改为:".$depository_code);
-        }
-        if ($quality && ($quality != $detail->lotatt08)){
-            $query = DB::raw("UPDATE DOC_ASN_DETAILS SET LOTATT08 = ?  WHERE ASNNO = ? AND ASNLINENO = ?");
-            $db->update($query,[$quality,$detail->asnno,$detail->asnlineno]);
-            $db->commit();
-            LogService::log(__METHOD__,"快速入库-修改FULX质量状态","ASNNO:".$asnno.";原质量:".$detail->lotatt08.";修改为:".$quality);
-            $In_LotAtt08_C = $quality;
-        }
-        $stmt = oci_parse($conn, $sql_sp);
-        oci_bind_by_name($stmt, ':IN_Warehouse', $IN_Warehouse);
-        oci_bind_by_name($stmt, ':In_Process_Action', $In_Process_Action);
-        oci_bind_by_name($stmt, ':In_ASNNo_C', $In_ASNNo_C);
-        oci_bind_by_name($stmt, ':In_ASNLineNo_C', $In_ASNLineNo_C);
-        oci_bind_by_name($stmt, ':In_FMTraceID_C', $In_FMTraceID_C);
-        oci_bind_by_name($stmt, ':In_New_TraceID_C', $In_New_TraceID_C);
-        oci_bind_by_name($stmt, ':In_ProductStatus', $In_ProductStatus);
-        oci_bind_by_name($stmt, ':In_ProductStatus_Descr', $In_ProductStatus_Descr);
-        oci_bind_by_name($stmt, ':In_HoldRejectCode_C', $In_HoldRejectCode_C);
-        oci_bind_by_name($stmt, ':In_HoldRejectReason_C', $In_HoldRejectReason_C);
-        oci_bind_by_name($stmt, ':In_PONo_C', $In_PONo_C);
-        oci_bind_by_name($stmt, ':In_CustomerID', $In_CustomerID);
-        oci_bind_by_name($stmt, ':In_SKU', $In_SKU);
-        oci_bind_by_name($stmt, ':In_ReceivedQty', $In_ReceivedQty);
-        oci_bind_by_name($stmt, ':In_RejectedQty', $In_RejectedQty);
-        oci_bind_by_name($stmt, ':In_UOM', $In_UOM);
-        oci_bind_by_name($stmt, ':In_PackID', $In_PackID);
-        oci_bind_by_name($stmt, ':In_ContainerID', $In_ContainerID);
-        oci_bind_by_name($stmt, ':In_LotAtt01_C', $In_LotAtt01_C);
-        oci_bind_by_name($stmt, ':In_LotAtt02_C', $In_LotAtt02_C);
-        oci_bind_by_name($stmt, ':In_LotAtt03_C', $In_LotAtt03_C);
-        oci_bind_by_name($stmt, ':In_LotAtt04_C', $In_LotAtt04_C);
-        oci_bind_by_name($stmt, ':In_LotAtt05_C', $In_LotAtt05_C);
-        oci_bind_by_name($stmt, ':In_LotAtt06_C', $In_LotAtt06_C);
-        oci_bind_by_name($stmt, ':In_LotAtt07_C', $In_LotAtt07_C);
-        oci_bind_by_name($stmt, ':In_LotAtt08_C', $In_LotAtt08_C);
-        oci_bind_by_name($stmt, ':In_LotAtt09_C', $In_LotAtt09_C);
-        oci_bind_by_name($stmt, ':In_LotAtt10_C', $In_LotAtt10_C);
-        oci_bind_by_name($stmt, ':In_LotAtt11_C', $In_LotAtt11_C);
-        oci_bind_by_name($stmt, ':In_LotAtt12_C', $In_LotAtt12_C);
-        oci_bind_by_name($stmt, ':In_TotalCubic', $In_TotalCubic);
-        oci_bind_by_name($stmt, ':In_TotalGrossWeight', $In_TotalGrossWeight);
-        oci_bind_by_name($stmt, ':In_TotalNetWeight', $In_TotalNetWeight);
-        oci_bind_by_name($stmt, ':In_TotalPrice', $In_TotalPrice);
-        oci_bind_by_name($stmt, ':In_UserDefine1', $In_UserDefine1);
-        oci_bind_by_name($stmt, ':In_UserDefine2', $In_UserDefine2);
-        oci_bind_by_name($stmt, ':In_UserDefine3', $In_UserDefine3);
-        oci_bind_by_name($stmt, ':In_UserDefine4', $In_UserDefine4);
-        oci_bind_by_name($stmt, ':In_UserDefine5', $In_UserDefine5);
-        oci_bind_by_name($stmt, ':In_FMLocation', $In_FMLocation);
-        oci_bind_by_name($stmt, ':In_TOLocation_C', $In_TOLocation_C);
-        oci_bind_by_name($stmt, ':In_QC_Type_C', $In_QC_Type_C);
-        oci_bind_by_name($stmt, ':In_PlanToLoc_C', $In_PlanToLoc_C);
-        oci_bind_by_name($stmt, ':In_ReceivingTime', $In_ReceivingTime);
-        oci_bind_by_name($stmt, ':In_LPN', $In_LPN);
-        oci_bind_by_name($stmt, ':In_Operator', $In_Operator);
-        oci_bind_by_name($stmt, ':IN_RCVModule', $IN_RCVModule);
-        oci_bind_by_name($stmt, ':IN_RCVStation', $IN_RCVStation);
-        oci_bind_by_name($stmt, ':In_Language', $In_Language);
-        oci_bind_by_name($stmt, ':In_UserID', $In_UserID);
-        oci_bind_by_name($stmt, ':OUT_Return_Code', $result,300);
-        oci_execute($stmt);
-        return $result;
-    }
-
+        });
 
-    public function validator(Request $request){
-        $validator=Validator::make($request->input(),[
-            'asn_code'=>['required'],
-            'quality'=>['required'],
-            'depository_code'=>['nullable','string'],
-        ],[
-            'required'=>':attribute 为必填项',
-            'unique'=>':attribute 已存在',
-        ],[
-            'asn_code'=>'ASN编号',
-            'quality'=>'货物类型'
-        ])->validate();
-        return $validator;
+        return $success;
     }
 }

+ 1 - 1
app/Http/Middleware/DecodingRequest.php

@@ -18,7 +18,7 @@ class DecodingRequest
     {
         if ($request->method() == "GET"){
             foreach ($request->input() as $key => $value){
-                if ($value != null)$request->offsetSet($key, str_replace("%20"," ",$value));
+                if ($value != null)$request->offsetSet($key, urldecode($value));
             }
         }
         return $next($request);

+ 0 - 1
app/LaborReport.php

@@ -77,7 +77,6 @@ class LaborReport extends Model
     }
     public function setRemarkAttribute($remark,$id){
         return Sign::updateOrCreate(['signable_type'=>'labor_reports','signable_id'=>$id,'field'=>'remark'],['mark'=>$remark]);
-
     }
     public function getIsExportGroupAttribute(){
         return $this['check_out_at']? true:false;

+ 28 - 9
app/Services/AllInventoryService.php

@@ -2,11 +2,13 @@
 
 namespace App\Services;
 
+use App\Owner;
 use Illuminate\Support\Facades\DB;
 
 Class AllInventoryService
 {
     public function getSql(array $params, $page=null, $paginate=null){
+        $ownerCodes=Owner::filterAuthorities()->select('code')->get();
         $date_start=$params['date_start'] ?? null;
         $range = $params['range'] ?? null;
         if ($range)$date_start=date('Y-m-d',strtotime('-'.$range." day"));
@@ -27,6 +29,23 @@ Class AllInventoryService
         $sql.=' left join BAS_Customer customer on customer.CustomerID=storeStatus.CUSTOMERID ';
         $sql.=' left join BAS_SKU sku on sku.SKU=storeStatus.SKU and sku.CUSTOMERID=storeStatus.CUSTOMERID ';
         $sql.=' left join INV_LOT_ATT lot on lot.LOTNUM = storeStatus.LOTNUM AND lot.CUSTOMERID = storeStatus.CUSTOMERID ';
+        if ($customerid){
+            $sql .= ' where storeStatus.CUSTOMERID in (';
+            $arr = explode(',',$customerid);
+            foreach ($arr as $index => $data){
+                if ($index != 0)$sql .= ',';
+                $sql .= "'".$data."'";
+            }
+            $sql .= ') ';
+        }
+        if (!$customerid&&$ownerCodes){
+            $sql .= ' where storeStatus.CUSTOMERID in (';
+            foreach ($ownerCodes as $index => $data){
+                if ($index != 0)$sql .= ',';
+                $sql .= "'".$data['code']."'";
+            }
+            $sql .= ') ';
+        }
         $sql.=' group by storeStatus.LocationID,customer.Descr_C,sku.SKU,sku.ALTERNATE_SKU1 ';
         $sql.=' ,sku.Descr_C,lot.LotAtt05,lot.LotAtt08,lot.LotAtt02,lot.LotAtt04 ';
         $sql.=' , storeStatus.QTY, storeStatus.QtyAllocated,storeStatus.CUSTOMERID,storeStatus.ADDTIME  ';
@@ -38,15 +57,15 @@ Class AllInventoryService
         if ($date_end)$sql.=" and 创建时间 < to_date('".$date_end." 23:59:59','yyyy-mm-dd hh24:mi:ss') ";
         if ($LotAtt02_start)$sql.=" and 失效日期 >='".$LotAtt02_start." 00:00:00' ";
         if ($LotAtt02_end)$sql.=" and 失效日期 <='".$LotAtt02_end." 23:59:59' ";
-        if ($customerid){
-            $sql .= ' and 客户 in (';
-            $arr = explode(',',$customerid);
-            foreach ($arr as $index => $data){
-                if ($index != 0)$sql .= ',';
-                $sql .= "'".$data."'";
-            }
-            $sql .= ') ';
-        }
+//        if ($customerid){
+//            $sql .= ' and 客户 in (';
+//            $arr = explode(',',$customerid);
+//            foreach ($arr as $index => $data){
+//                if ($index != 0)$sql .= ',';
+//                $sql .= "'".$data."'";
+//            }
+//            $sql .= ') ';
+//        }
         if ($ALTERNATE_SKU1)$sql.=" and 产品条码 like '".$ALTERNATE_SKU1."' ";
         if ($page&&$paginate)$sql.="  and ROWNUM<='".$page*$paginate."'";
         $sql.=' )  ';

+ 34 - 0
app/Services/InventoryService.php

@@ -5,12 +5,14 @@ namespace App\Services;
 
 use App\inventoryDailyLog;
 use App\InventoryDailyLoggingOwner;
+use App\Owner;
 use App\Services\common\QueryService;
 use Illuminate\Support\Facades\DB;
 
 class InventoryService
 {
     public function getSql(array $params,$page=null,$paginate=null){
+        $ownerCodes=Owner::filterAuthorities()->select('code')->get();
         $date_start=$params['date_start'] ?? null;
         $range = $params['range'] ?? null;
         if ($range)$date_start=date('Y-m-d',strtotime('-'.$range." day"));
@@ -43,6 +45,14 @@ class InventoryService
             }
             $sql .= ') ';
         }
+        if (!$customerid&&$ownerCodes){
+            $sql .= ' and TOCustomerID in (';
+            foreach ($ownerCodes as $index => $data){
+                if ($index != 0)$sql .= ',';
+                $sql .= "'".$data['code']."'";
+            }
+            $sql .= ') ';
+        }
         $sql.=' group by TOCustomerID, TOLocation,FMSKU,FMLotNum union all ';
         $sql.=' select FMLotNum,FMSKU,FMCUSTOMERID 客户,sum(FMQty_Each) as 移出数量, 0 as 移入数量, FMLOCATION as 库位 ';
         $sql.=" from ACT_Transaction_Log where TransactionType='SO' ";
@@ -59,6 +69,14 @@ class InventoryService
             }
             $sql .= ') ';
         }
+        if (!$customerid&&$ownerCodes){
+            $sql .= ' and FMCUSTOMERID in (';
+            foreach ($ownerCodes as $index => $data){
+                if ($index != 0)$sql .= ',';
+                $sql .= "'".$data['code']."'";
+            }
+            $sql .= ') ';
+        }
         $sql.=' group by FMCustomerID, FMLocation,FMSKU,FMLotNum union all ';
         $sql.=' select FMLotNum,FMSKU,FMCUSTOMERID 客户,sum(FMQty_Each) as 移出数量,0 as 移入数量, FMLocation as 库位 ';
         $sql.=" from ACT_Transaction_Log  where TransactionType='MV' ";
@@ -75,6 +93,14 @@ class InventoryService
             }
             $sql .= ') ';
         }
+        if (!$customerid&&$ownerCodes){
+            $sql .= ' and FMCUSTOMERID in (';
+            foreach ($ownerCodes as $index => $data){
+                if ($index != 0)$sql .= ',';
+                $sql .= "'".$data['code']."'";
+            }
+            $sql .= ') ';
+        }
         $sql.=' group by FMLocation,FMCUSTOMERID,FMSKU,FMLotNum union all ';
         $sql.=' select FMLotNum,FMSKU,TOCustomerID 客户,0 as 移出数量,sum(TOQty_Each)as 移入数量, TOLocation as 库位 ';
         $sql.=" from ACT_Transaction_Log where TransactionType='MV' ";
@@ -91,6 +117,14 @@ class InventoryService
             }
             $sql .= ') ';
         }
+        if (!$customerid&&$ownerCodes){
+            $sql .= ' and TOCustomerID in (';
+            foreach ($ownerCodes as $index => $data){
+                if ($index != 0)$sql .= ',';
+                $sql .= "'".$data['code']."'";
+            }
+            $sql .= ') ';
+        }
         $sql.=' group by TOLocation,TOCustomerID,FMSKU,FMLotNum)stockLog ';
         $sql.=' left join BAS_Customer customer on customer.CustomerID=stockLog.客户 ';
         $sql.=' left join BAS_SKU sku on sku.SKU=stockLog.FMSKU and sku.CUSTOMERID=stockLog.客户 ';

+ 1 - 0
app/Services/RejectedService.php

@@ -28,6 +28,7 @@ class RejectedService
             'created_at_end' => ['alias' => 'created_at', 'endDate' => ' 23:59:59'],
             'owner_id' => ['alias' => 'id_owner', 'multi' => ','],
             'order_number' => ['like' => ''],
+            'remark' => ['like' => '','timeLimit'=>15],
             'logistic_number' => ['like' => ''],
             'mobile_sender' => ['like' => ''],
             'checked_numbers' => ['like' => ''],

+ 1 - 0
config/stores.php

@@ -5,6 +5,7 @@ return [
         "笕尚" => "JIANSHANG",
         "幼岚" => "ALLBLU",
         "淳钲" => "CHUNZHENG",
+        "宝时" => "BAOSHI",
     ],
     "types" => [
         'THRK','DBRK','QTRK','HHRK','CGRK'

+ 21 - 1
database/migrations/2020_10_20_134819_create_customers_table.php

@@ -14,6 +14,25 @@ class CreateCustomersTable extends Migration
         '客户管理-项目-查询',
         '客户管理-项目-录入',
         '客户管理-项目-面积',
+        '客户管理-财务-即时账单',
+        '客户管理-财务-账单确认',
+        '计费模型-仓储',
+        '计费模型-仓储-录入',
+        '客户',
+        '客户-查询',
+        '客户-录入',
+        '项目组',
+        '项目组-查询',
+        '项目组-录入',
+        '作业类型',
+        '作业类型-查询',
+        '作业类型-录入',
+        '特征',
+        '特征-录入',
+        '特征-查询',
+        '计费模型-作业',
+        '计费模型-作业-查询',
+        '计费模型-作业-录入',
     ];
     /**
      * Run the migrations.
@@ -26,7 +45,8 @@ class CreateCustomersTable extends Migration
             $table->id();
             $table->string('code')->unique()->comment('客户代码');
             $table->string('name')->comment('客户名称');
-            $table->timestamp('created_at');
+            $table->string('company_name')->comment('公司名称');
+            $table->timestamps();
         });
         foreach ($this->authNames as $name){
             if(!Authority::query()->where('name',$name)->first())(new Authority(['name'=>$name,'alias_name'=>$name]))->save();

+ 12 - 3
database/migrations/2020_10_26_165012_create_owner_fee_details_table.php

@@ -17,12 +17,21 @@ class CreateOwnerFeeDetailsTable extends Migration
             $table->id();
             $table->bigInteger('owner_id')->index()->comment('外键货主');
             $table->date('counting_month')->index()->comment('结算月');
-            $table->dateTime('worked_at')->index()->comment('作业时间');
+            $table->date('worked_at')->index()->comment('作业时间');
             $table->enum('type',["发货","收货","增值服务"])->index()->comment('类型');
             $table->bigInteger('shop_id')->nullable()->index()->comment('外键店铺');
             $table->string('operation_bill')->nullable()->comment('发/收/退货单号');
-            //TODO 字段与来源渠道无法确认 暂时搁置
-            $table->timestamps();
+            $table->string('consignee_name')->nullable()->comment('收货人');
+            $table->string('consignee_phone')->nullable()->comment('收货人电话');
+            $table->string('commodity_amount')->nullable()->comment('商品数量');
+            $table->string('logistic_bill')->nullable()->comment('快递单号');
+            $table->decimal('volume',8,3)->nullable()->comment('体积');
+            $table->decimal('weight',8,3)->nullable()->comment('重量');
+            $table->bigInteger("logistic_id")->nullable()->index()->comment("快递公司");
+            $table->bigInteger('process_method_id')->nullable()->index()->comment('外键加工类型');
+            $table->decimal('work_fee',8,4)->nullable()->comment('作业费');
+            $table->decimal('logistic_fee',8,4)->nullable()->comment('物流费');
+            $table->timestamp('created_at')->nullable()->comment('创建时间');
         });
     }
 

+ 37 - 0
database/migrations/2020_10_27_103741_create_owner_bill_reports_table.php

@@ -0,0 +1,37 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateOwnerBillReportsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('owner_bill_reports', function (Blueprint $table) {
+            $table->id();
+            $table->bigInteger('owner_id')->index()->comment('外键项目');
+            $table->date('counting_month')->index()->comment('结算月');
+            $table->decimal('initial_fee',8,4)->nullable()->comment('原始账单金额');
+            $table->decimal('confirm_fee',8,4)->nullable()->comment('确认账单金额');
+            $table->decimal('difference',8,4)->nullable()->comment('差额');
+            $table->enum('confirmed',["是","否"])->default("否")->comment("确认状态");
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('owner_bill_reports');
+    }
+}

+ 29 - 0
database/migrations/2020_10_27_112348_add_rejecteds_authorities.php

@@ -0,0 +1,29 @@
+<?php
+
+use App\Authority;
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddRejectedsAuthorities extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        (new Authority(['name'=>'退货管理-编辑备注','alias_name'=>'退货管理-编辑备注']))->save();
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Authority::where('name','退货管理-编辑备注')->delete();
+    }
+}

+ 38 - 0
database/migrations/2020_10_27_142647_create_owner_storage_price_model_table.php

@@ -0,0 +1,38 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateOwnerStoragePriceModelTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('owner_storage_price_model', function (Blueprint $table) {
+            $table->id();
+            $table->enum("counting_type",["包仓","灵活用仓","统单价"])->default("灵活用仓")->comment('计费类型');
+            $table->enum("using_type",["常温","恒温"])->default("常温")->comment('用仓类型');
+            $table->decimal("minimum_area")->default(0)->comment("最低起租面积");
+            $table->decimal("price",8,3)->comment("单价");
+            $table->enum("discount_type",["无减免","按单减免","固定减免"])->default("无减免")->comment("最低起租面积");
+            $table->decimal("discount_value")->nullable()->comment("减免值");
+            $table->bigInteger("unit_id")->nullable()->index()->comment("外键单位");
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('owner_storage_price_model');
+    }
+}

+ 32 - 0
database/migrations/2020_10_27_162056_add_column_unit_id_table_process_methods.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddColumnUnitIdTableProcessMethods extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('process_methods', function (Blueprint $table) {
+            $table->bigInteger("unit_id")->nullable()->index()->comment('单位');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('process_methods', function (Blueprint $table) {
+            $table->dropColumn("unit_id");
+        });
+    }
+}

+ 36 - 0
database/migrations/2020_10_27_175452_create_owner_price_operations_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateOwnerPriceOperationsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('owner_price_operations', function (Blueprint $table) {
+            $table->id();
+            $table->enum("operation_type",["入库","出库"])->default("入库")->comment("操作类型");
+            $table->string("name")->nullable()->comment("名称");
+            $table->enum("strategy",["默认","特征"])->default("默认")->comment("策略");
+            $table->string("feature")->nullable()->comment("特征");
+            $table->string("remark")->nullable()->comment("备注");
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('owner_price_operations');
+    }
+}

+ 36 - 0
database/migrations/2020_10_28_105613_create_owner_out_storage_rules_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateOwnerOutStorageRulesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('owner_out_storage_rules', function (Blueprint $table) {
+            $table->bigInteger("owner_price_operation_id")->comment("外键作业计费模型");
+            $table->enum("owner_price_operation_strategy",["默认","特征"])->comment("作业计费模型策略");
+            $table->enum("strategy",["起步","默认","特征"])->comment("出库策略");
+            $table->integer("amount")->nullable()->comment("起步数");
+            $table->bigInteger("unit_id")->index()->comment("外键单位");
+            $table->decimal("unit_price",8,4)->comment("单价");
+            $table->string("feature")->nullable()->comment("特征");
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('owner_out_storage_rules');
+    }
+}

+ 33 - 0
database/migrations/2020_10_28_105639_create_owner_in_storage_rules_table.php

@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateOwnerInStorageRulesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('owner_in_storage_rules', function (Blueprint $table) {
+            $table->bigInteger("owner_price_operation_id")->primary()->comment("外键作业计费模型");
+            $table->integer("amount")->default(1)->comment("计量");
+            $table->bigInteger("unit_id")->index()->comment("外键单位");
+            $table->decimal("unit_price",8,4)->comment("单价");
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('owner_in_storage_rules');
+    }
+}

+ 34 - 0
database/migrations/2020_10_28_110936_create_features_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateFeaturesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('features', function (Blueprint $table) {
+            $table->id();
+            $table->enum("type",["商品名称","订单类型","承运商","店铺类型"])->index()->comment("特征类型");
+            $table->enum("logic",["包含","不包含","等于"])->index()->comment("逻辑");
+            $table->string("describe")->comment("特征");
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('features');
+    }
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 329
public/css/app.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 86492
public/js/app.js


+ 6 - 5
resources/js/queryForm/queryForm.js

@@ -45,12 +45,12 @@ const query = function getQueryForm(data) {
                     //     }
                     // }
                     // console.log(map.value);
-                    form.append("<input name='" + key + "' value='" + map.value.replace(" ","%20") + "'>");
-                    // form.append("<input name='" + key + "' value='" + encodeURIComponent(map.value) + "'>")
+                    //form.append("<input name='" + key + "' value='" + map.value.replace(" ","%20") + "'>");
+                      form.append("<input name='" + key + "' value='" + encodeURIComponent(map.value) + "'>")
                 } else if ('array' === fetchJsType(map.value)) {
                     let string = map.value.join(',');
-                    form.append("<input  name='" + key + "' value='" + string.replace(" ","%20") + "'>");
-                    // form.append("<input  name='" + key + "' value='" + encodeURIComponent(string) + "'>")
+                    //form.append("<input  name='" + key + "' value='" + string.replace(" ","%20") + "'>");
+                    form.append("<input  name='" + key + "' value='" + encodeURIComponent(string) + "'>")
                 }
             }
             for (let key in this.param){
@@ -1225,7 +1225,8 @@ const query = function getQueryForm(data) {
     // url path on search form option  renderer
     function searchOptionToUrlsearch() {
         let data = (window.location.search);
-        data = decodeURIComponent(data).replace('%20'," ");
+        data = decodeURIComponent(decodeURIComponent(data));
+        //data = decodeURIComponent(data).replace('%20'," ");
         if (!!data) {
             data = (data.substr(1)).split('&');
             data = convertArrayToObj(data);

+ 6 - 0
resources/sass/layout.scss

@@ -26,6 +26,12 @@
         background: #f9f0f0;
     }
 }
+.nav4{
+    transform: scaleX(0.98);
+    .card{
+        background: #eac3aa;
+    }
+}
 
 table,table.table-striped tbody{
     th {

+ 104 - 0
resources/views/customer/finance/billConfirmation.blade.php

@@ -0,0 +1,104 @@
+@extends('layouts.app')
+@section('title')客户管理-账单确认@endsection
+
+@section('content')
+    @component('customer.finance.menu')@endcomponent
+    <div class="container-fluid" id="container">
+        <div id="form_div"></div>
+        <div class="mt-1">
+            <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
+                    data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
+                导出Excel
+            </button>
+            <div class="dropdown-menu">
+                <a class="dropdown-item" @click="excelExport(false)" href="javascript:">导出勾选内容</a>
+                <a class="dropdown-item" @click="excelExport(true)" href="javascript:">导出所有页</a>
+            </div>
+        </div>
+        <div>
+            <label for="all" id="cloneCheckAll" class="d-none">
+                <input id="all" type="checkbox" @click="checkAll($event)">全选
+            </label>
+            <table class="d-none" id="headerRoll"></table>
+            <table class="table table-sm text-nowrap table-striped table-hover" id="headerParent">
+                <tr id="header"></tr>
+            </table>
+        </div>
+    </div>
+@stop
+
+@section("lastScript")
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
+    <script>
+        let vue = new Vue({
+            el:"#container",
+            data:{
+                checkData:[],
+                bills : [],
+            },
+            mounted(){
+                let data=[
+                    [
+                        {name:'workgroup',type:'select',tip:'项目小组',placeholder: '项目小组',data:[]},
+                        {name:'counting_month_start',type:'dateMonth',tip:'起始结算月'},
+                        {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的项目'],
+                            placeholder:['项目','定位或多选项目'],data:[]},
+                    ],[
+                        {name:'customer_id',type:'select',tip:'客户',placeholder: '客户',data:[]},
+                        {name:'counting_month_end',type:'dateMonth',tip:'结束结算月'},
+                    ],
+                ];
+                this.form = new query({
+                    el:"#form_div",
+                    condition:data,
+                });
+                this.form.init();
+                let column = [
+                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
+                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
+                    {name:'index',value: '序号', neglect: true},
+                    {name:'workgroup',value: '项目小组'},
+                    {name:'customer',value: '客户'},
+                    {name:'owner',value: '子项目'},
+                    {name:'counting_month',value: '结算月'},
+                    {name:'created_at',value: '录入日期'},
+                    {name:'initial_fee',value: '原始账单金额', neglect: true},
+                    {name:'confirm_fee',value: '确认账单金额', neglect: true},
+                    {name:'difference',value: '差额', neglect: true},
+                    {name:'operating',value: '操作', neglect: true},
+                ];
+                let _this=this;
+                setTimeout(function () {
+                    let header = new Header({
+                        el: "#header",
+                        column: column,
+                        data: _this.reports,
+                        restorationColumn: 'id',
+                        fixedTop:($('#form_div').height())+2,
+                        offset:0.5,
+                        vue:vue
+                    });
+                    header.init();
+                },0);
+            },
+            methods:{
+                excelExport(isAll){
+
+                },
+                //全选事件
+                checkAll(e){
+                    if (e.target.checked){
+                        this.bills.forEach((el)=>{
+                            if (this.checkData.indexOf(el.id) === '-1'){
+                                this.checkData.push(el.id);
+                            }
+                        });
+                    }else {
+                        this.checkData = [];
+                    }
+                },
+            },
+        });
+    </script>
+@stop

+ 120 - 0
resources/views/customer/finance/instantBill.blade.php

@@ -0,0 +1,120 @@
+@extends('layouts.app')
+@section('title')客户管理-即时账单@endsection
+
+@section('content')
+    @component('customer.finance.menu')@endcomponent
+    <div class="container-fluid" id="container">
+        <div id="form_div"></div>
+        <div class="mt-1">
+            <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
+                    data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
+                导出Excel
+            </button>
+            <div class="dropdown-menu">
+                <a class="dropdown-item" @click="excelExport(false)" href="javascript:">导出勾选内容</a>
+                <a class="dropdown-item" @click="excelExport(true)" href="javascript:">导出所有页</a>
+            </div>
+        </div>
+        <div>
+            <label for="all" id="cloneCheckAll" class="d-none">
+                <input id="all" type="checkbox" @click="checkAll($event)">全选
+            </label>
+            <table class="d-none" id="headerRoll"></table>
+            <table class="table table-sm text-nowrap table-striped table-hover" id="headerParent">
+                <tr class="text-center">
+                    <td colspan="2"></td>
+                    <td colspan="8" class="bg-light-info">单据信息</td>
+                    <td colspan="4" class="bg-light-khaki">物流作业信息</td>
+                    <td colspan="4" class="bg-light-cyanogen">费用信息</td>
+                </tr>
+                <tr id="header"></tr>
+            </table>
+        </div>
+    </div>
+@stop
+
+@section("lastScript")
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
+    <script>
+        let vue = new Vue({
+            el:"#container",
+            data:{
+                checkData:[],
+                bills : [],
+            },
+            mounted(){
+                let data=[
+                    [
+                        {name:'shop_name',type:'select',tip:'店铺',placeholder: '店铺',data:[]},
+                        {name:'counting_month_start',type:'dateMonth',tip:'起始结算月'},
+                        {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的项目'],
+                            placeholder:['项目','定位或多选项目'],data:[]},
+                        {name: 'operation_bill', type: 'input', tip: '发/收/退/提货单号:可在两侧增加百分号(%)进行模糊搜索', placeholder: '单据号'},
+                        {name:'type',type:'select',tip:'类型',placeholder: '类型',data:[]},
+                    ],[
+                        {name:'customer_id',type:'select',tip:'客户',placeholder: '客户',data:[]},
+                        {name:'counting_month_end',type:'dateMonth',tip:'结束结算月'},
+                        {name:'status',type:'select',placeholder:'状态',data:[]},
+                        {name:'logistic_bill', type: 'input', tip: '物流/快递单号:可在两侧增加百分号(%)进行模糊搜索', placeholder: '快递单号'},
+                    ],
+                ];
+                this.form = new query({
+                    el:"#form_div",
+                    condition:data,
+                });
+                this.form.init();
+                let column = [
+                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
+                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
+                    {name:'index',value: '序号', neglect: true},
+                    {name:'owner_name',value: '项目', class: "bg-info"},
+                    {name:'worked_at',value: '作业时间', class: "bg-info"},
+                    {name:'type',value: '类型', class: "bg-info"},
+                    {name:'shop_name',value: '店铺', class: "bg-info"},
+                    {name:'operation_bill',value: '单号(发/收/退/提)', class: "bg-info"},
+                    {name:'consignee_name',value: '收件人', class: "bg-info"},
+                    {name:'consignee_phone',value: '收件人电话', class: "bg-info"},
+                    {name:'commodity_amount',value: '商品数量', class: "bg-info", neglect: true},
+                    {name:'logistic_bill',value: '物流/快递单号', class: "bg-khaki"},
+                    {name:'volume',value: '体积', class: "bg-khaki", neglect: true},
+                    {name:'weight',value: '重量', class: "bg-khaki", neglect: true},
+                    {name:'logistic_name',value: '承运商', class: "bg-khaki"},
+                    {name:'work_fee',value: '操作费', class: "bg-cyanogen"},
+                    {name:'logistic_fee',value: '物流费', class: "bg-cyanogen"},
+                    {name:'total_fee',value: '合计', class: "bg-cyanogen"},
+                ];
+                let _this=this;
+                setTimeout(function () {
+                    let header = new Header({
+                        el: "#header",
+                        column: column,
+                        data: _this.bills,
+                        restorationColumn: 'id',
+                        fixedTop:($('#form_div').height())+2,
+                        offset:0.5,
+                        vue:vue
+                    });
+                    header.init();
+                },0);
+            },
+            methods:{
+                excelExport(isAll){
+
+                },
+                //全选事件
+                checkAll(e){
+                    if (e.target.checked){
+                        this.owners.forEach((el)=>{
+                            if (this.checkData.indexOf(el.id) === '-1'){
+                                this.checkData.push(el.id);
+                            }
+                        });
+                    }else {
+                        this.checkData = [];
+                    }
+                },
+            },
+        });
+    </script>
+@stop

+ 18 - 0
resources/views/customer/finance/menu.blade.php

@@ -0,0 +1,18 @@
+<div id="nav2">
+    @component('customer.menu')
+    @endcomponent
+    <div class="container-fluid nav3">
+        <div class="card menu-third" >
+            <ul class="nav nav-pills">
+                @can('客户管理-财务-即时账单')
+                <li class="nav-item">
+                    <a class="nav-link" href="{{url('customer/finance/instantBill')}}" :class="{active:isActive('instantBill',3)}">即时账单</a>
+                </li> @endcan
+                @can('客户管理-财务-账单确认')
+                <li class="nav-item">
+                    <a class="nav-link" href="{{url('customer/finance/billConfirmation')}}" :class="{active:isActive('billConfirmation',3)}">账单确认</a>
+                </li> @endcan
+            </ul>
+        </div>
+    </div>
+</div>

+ 1 - 1
resources/views/customer/menu.blade.php

@@ -7,7 +7,7 @@
                 <a class="nav-link" href="{{url('customer/project/report')}}" :class="{active:isActive('project',2)}">项目</a>
             </li>@endcan
             <li class="nav-item">
-                <a class="nav-link" href="{{url('customer')}}" :class="{active:isActive('delivering',3)}">财务</a>
+                <a class="nav-link" href="{{url('customer/finance/instantBill')}}" :class="{active:isActive('finance',2)}">财务</a>
             </li>
             <li class="nav-item">
                 <a class="nav-link" href="{{url('customer/relating')}}" :class="{active:isActive('delivering',3)}">相关设置</a>

+ 2 - 1
resources/views/inventory/statement/changeInventory.blade.php

@@ -64,7 +64,8 @@
                 page:Number('{{$page}}'),
                 owners:[
                     @foreach($owners as $owner)
-                    {name:'{{$owner->customerid}}',value:'{{$owner->descr_c}}'},
+                    {{--{name:'{{$owner->customerid}}',value:'{{$owner->descr_c}}'},--}}
+                    {name:'{{$owner->code}}',value:'{{$owner->name}}'},
                     @endforeach
                 ],
                 checkData:[],

+ 27 - 0
resources/views/maintenance/customer/create.blade.php

@@ -0,0 +1,27 @@
+@extends('layouts.app')
+@section('title')客户-录入@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.customer.menu')@endcomponent
+    </div>
+    <div class="container-fluid card">
+        <div class="card-body offset-3 mt-2">
+            <form method="post" action="{{url('')}}">
+                <div class="row">
+                    <label class="col-2" for="name">客户名称</label>
+                    <input class="form-control col-6" id="name" name="name">
+                </div>
+                <div class="row mt-3">
+                    <label class="col-2" for="company_name">公司名称</label>
+                    <input class="form-control col-6" id="company_name" name="company_name">
+                </div>
+                <div class="row mt-3 offset-1">
+                    <button class="btn btn-success col-7">提交</button>
+                </div>
+            </form>
+        </div>
+    </div>
+@stop
+

+ 23 - 0
resources/views/maintenance/customer/index.blade.php

@@ -0,0 +1,23 @@
+@extends('layouts.app')
+@section('title')客户@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.customer.menu')@endcomponent
+    </div>
+    <div class="container-fluid card">
+        <div class="card-body mt-2">
+            <table class="table table-striped table-hover text-nowrap">
+                <tr>
+                    <th>ID</th>
+                    <th>名称</th>
+                    <th>客户全称</th>
+                    <th>创建时间</th>
+                    <th>操作</th>
+                </tr>
+            </table>
+        </div>
+    </div>
+@stop
+

+ 14 - 0
resources/views/maintenance/customer/menu.blade.php

@@ -0,0 +1,14 @@
+<div class="container-fluid nav3">
+    <div class="card menu-third" >
+        <ul class="nav nav-pills">
+            @can('客户-查询')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/customer')}}" :class="{active:isActive('',3)}">查询</a>
+            </li> @endcan
+            @can('客户-录入')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/customer/create')}}" :class="{active:isActive('create',3)}">录入</a>
+            </li> @endcan
+        </ul>
+    </div>
+</div>

+ 35 - 0
resources/views/maintenance/feature/create.blade.php

@@ -0,0 +1,35 @@
+@extends('layouts.app')
+@section('title')特征-录入@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.feature.menu')@endcomponent
+    </div>
+    <div class="container-fluid card">
+        <div class="card-body offset-3 mt-2">
+            <form method="post" action="{{url('')}}">
+                <div class="row">
+                    <label class="col-2" for="type">特征类型</label>
+                    <select class="form-control col-3" id="type" name="type">
+                        <option></option>
+                    </select>
+                </div>
+                <div class="row mt-3">
+                    <label class="col-2" for="logic">逻辑</label>
+                    <select class="form-control col-3" id="logic" name="logic">
+                        <option></option>
+                    </select>
+                </div>
+                <div class="row mt-3">
+                    <label class="col-2" for="describe">字段特征</label>
+                    <input class="form-control col-6" id="describe" name="describe">
+                </div>
+                <div class="row mt-3 offset-1">
+                    <button class="btn btn-success col-7">提交</button>
+                </div>
+            </form>
+        </div>
+    </div>
+@stop
+

+ 24 - 0
resources/views/maintenance/feature/index.blade.php

@@ -0,0 +1,24 @@
+@extends('layouts.app')
+@section('title')特征@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.feature.menu')@endcomponent
+    </div>
+    <div class="container-fluid card">
+        <div class="card-body mt-2">
+            <table class="table table-striped table-hover text-nowrap">
+                <tr>
+                    <th>ID</th>
+                    <th>类型</th>
+                    <th>逻辑</th>
+                    <th>特征</th>
+                    <th>创建时间</th>
+                    <th>操作</th>
+                </tr>
+            </table>
+        </div>
+    </div>
+@stop
+

+ 14 - 0
resources/views/maintenance/feature/menu.blade.php

@@ -0,0 +1,14 @@
+<div class="container-fluid nav3">
+    <div class="card menu-third" >
+        <ul class="nav nav-pills">
+            @can('特征-查询')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/feature')}}" :class="{active:isActive('',3)}">查询</a>
+            </li> @endcan
+            @can('特征-录入')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/feature/create')}}" :class="{active:isActive('create',3)}">录入</a>
+            </li> @endcan
+        </ul>
+    </div>
+</div>

+ 20 - 8
resources/views/maintenance/menu.blade.php

@@ -18,10 +18,18 @@
                 <li class="nav-item">
                     <a class="nav-link" href="{{url('maintenance/userWorkgroup')}}" :class="{active:isActive('userWorkgroup',2)}">工作组</a>
                 </li> @endcan
+            @can('项目组')
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('maintenance/userOwnerGroup')}}" :class="{active:isActive('userOwnerGroup',2)}">项目组</a>
+                </li> @endcan
             @can('仓库')
                 <li class="nav-item">
                     <a class="nav-link text-muted" href="{{url('maintenance/warehouse')}}" :class="{active:isActive('warehouse',2)}">仓库</a>
                 </li> @endcan
+            @can('客户')
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('maintenance/customer')}}" :class="{active:isActive('customer',2)}">客户</a>
+                </li> @endcan
             @can('货主')
                 <li class="nav-item">
                     <a class="nav-link text-dark" href="{{url('maintenance/owner')}}" :class="{active:isActive('owner',2)}">货主</a>
@@ -30,21 +38,25 @@
                 <li class="nav-item">
                     <a class="nav-link text-dark" href="{{url('maintenance/qualityLabel')}}" :class="{active:isActive('qualityLabel',2)}">品质标签</a>
                 </li> @endcan
+            @can('作业类型')
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('maintenance/processMethod')}}" :class="{active:isActive('processMethod',2)}">作业类型</a>
+                </li> @endcan
             @can('商品信息')
                 <li class="nav-item">
                     <a class="nav-link text-dark" href="{{url('maintenance/commodity')}}" :class="{active:isActive('commodity',2)}">商品信息</a>
                 </li> @endcan
             @can('计量单位')
                 <li class="nav-item">
-                    <a class="nav-link text-info" href="{{url('maintenance/unit')}}" :class="{active:isActive('unit',2)}">计量单位</a>
+                    <a class="nav-link text-dark" href="{{url('maintenance/unit')}}" :class="{active:isActive('unit',2)}">计量单位</a>
                 </li> @endcan
             @can('省份')
                 <li class="nav-item">
-                    <a class="nav-link text-info" href="{{url('maintenance/province')}}" :class="{active:isActive('province',2)}">省份</a>
+                    <a class="nav-link text-dark" href="{{url('maintenance/province')}}" :class="{active:isActive('province',2)}">省份</a>
                 </li> @endcan
             @can('城市')
                 <li class="nav-item">
-                    <a class="nav-link text-info" href="{{url('maintenance/city')}}" :class="{active:isActive('city',2)}">城市</a>
+                    <a class="nav-link text-dark" href="{{url('maintenance/city')}}" :class="{active:isActive('city',2)}">城市</a>
                 </li> @endcan
             @can('物流公司')
                 <li class="nav-item">
@@ -58,17 +70,17 @@
                 <li class="nav-item">
                     <a class="nav-link text-dark" href="{{url('maintenance/carType')}}" :class="{active:isActive('carType',2)}">车型</a>
                 </li> @endcan
-            @can('计价模型')
-                <li class="nav-item">
-                    <a class="nav-link text-dark" href="{{url('maintenance/priceModel/storage')}}" :class="{active:isActive('priceModel',2)}">计价模型</a>
-                </li>@endcan
             @can('作业类型')
                 <li class="nav-item">
                     <a class="nav-link text-dark" href="{{url('maintenance/jobType')}}" :class="{active:isActive('jobType',2)}">作业类型</a>
                 </li>@endcan
+            @can('特征')
+                <li class="nav-item">
+                    <a class="nav-link text-dark" href="{{url('maintenance/feature')}}" :class="{active:isActive('feature',2)}">特征</a>
+                </li>@endcan
             @can('计费模型')
                 <li class="nav-item">
-                    <a class="nav-link text-dark" href="{{url('maintenance/waybillPriceModel')}}" :class="{active:isActive('waybillPriceModel',2)}">计费模型</a>
+                    <a class="nav-link text-info" href="{{url('maintenance/priceModel/waybillPriceModel')}}" :class="{active:isActive('priceModel',2)}">计费模型</a>
                 </li> @endcan
             @can('纸箱')
                 <li class="nav-item">

+ 18 - 0
resources/views/maintenance/priceModel/menu.blade.php

@@ -0,0 +1,18 @@
+<div class="container-fluid nav3">
+    <div class="card menu-third" >
+        <ul class="nav nav-pills">
+            @can('计费模型-查询')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/waybillPriceModel')}}" :class="{active:isActive('waybillPriceModel',3)}">运输付费</a>
+            </li> @endcan
+            @can('计费模型-仓储')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/storage')}}" :class="{active:isActive('storage',3)}">仓储计费</a>
+            </li> @endcan
+            @can('计费模型-作业')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/operation')}}" :class="{active:isActive('operation',3)}">作业计费</a>
+            </li> @endcan
+        </ul>
+    </div>
+</div>

+ 174 - 0
resources/views/maintenance/priceModel/operation/create.blade.php

@@ -0,0 +1,174 @@
+@extends('layouts.app')
+@section('title')计费模型-仓储计费@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.priceModel.operation.menu')@endcomponent
+    </div>
+    <div class="container-fluid mt-2 card" id="container">
+        <div class="modal fade" style="top: 30%" id="modal" tabindex="-1" role="dialog" aria-hidden="true">
+            <div class="modal-dialog">
+                <div class="modal-content">
+                    <div class="modal-body">
+                        <div>
+                            <div class="col-3 form-inline">
+                                <label for="feature_type">类型:</label>
+                                <select id="feature_type" class="form-control form-control-sm">
+                                    <option>商品名称</option>
+                                </select>
+                            </div>
+                            <div class="col-3 form-inline">
+                                <label for="feature_logic">逻辑:</label>
+                                <select id="feature_logic" class="form-control form-control-sm">
+                                    <option>不包含</option>
+                                </select>
+                            </div>
+                            <div class="col-4 form-inline">
+                                <label for="feature">特征:</label>
+                                <input id="feature" type="text" class="form-control form-control-sm">
+                            </div>
+                            <div class="col-2 form-inline">
+
+                            </div>
+                        </div>
+                        <div class="row">
+                            <div class="col-3 form-inline">
+                                <label for="feature_type">类型:</label>
+                                <select id="feature_type" class="form-control form-control-sm">
+                                    <option>商品名称</option>
+                                </select>
+                            </div>
+                            <div class="col-3 form-inline">
+                                <label for="feature_logic">逻辑:</label>
+                                <select id="feature_logic" class="form-control form-control-sm">
+                                    <option>不包含</option>
+                                </select>
+                            </div>
+                            <div class="col-4 form-inline">
+                                <label for="feature">特征:</label>
+                                <input id="feature" type="text" class="form-control form-control-sm">
+                            </div>
+                            <div class="col-2 form-inline">
+
+                            </div>
+                        </div>
+                    </div>
+                    <div class="modal-footer">
+                        <button type="button" class="btn btn-success">提交更改</button>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <form method="GET" action="{{url('')}}" class="card-body offset-3">
+            <div class="row">
+                <label class="col-2" for="owner_id">项目</label>
+                <select id="owner_id" name="owner_id" class="selectpicker" multiple data-live-search="true" title="项目(多选)">
+
+                </select>
+            </div>
+            <div class="row mt-3">
+                <label for="type" class="col-2">操作类型</label>
+                <select id="type" v-model="type" name="type" class="col-3 form-control">
+                    <option>入库</option>
+                    <option>出库</option>
+                </select>
+            </div>
+            <div class="row mt-3">
+                <label for="strategy" class="col-2">计费策略</label>
+                <select id="strategy" name="strategy" class="col-3 form-control">
+
+                </select>
+            </div>
+            <div class="row mt-3">
+                <label for="name" class="col-2">名称</label>
+                <input id="name" type="text" name="name" class="col-6 form-control">
+            </div>
+            <div class="row mt-3">
+                <div v-for="(pond,i) in ponds" class="card row text-white col-8" :class="i>0 ? 'bg-secondary mt-2' : 'bg-info'">
+                    <div class="card-header">
+                        <div class="pull-left" v-if="i==0 && type=='出库'"><span @click="addDom()" class="fa fa-plus-square-o" style="cursor: pointer"></span></div>
+                        <div class="pull-right" v-if="i==len && len!=0"><span @click="delDom(i)" class="fa fa-window-close-o" style="cursor: pointer"></span></div>
+                    </div>
+                    <div class="card-body">
+                        <div class="row">
+                            <div class="col-4 form-inline">
+                                <label for="amount"><span v-if="type=='出库'">起步数:</span><span v-else>计量:</span></label>
+                                <input id="amount" type="number" name="amount" class="form-control">
+                            </div>
+                            <div class="col-4 form-inline">
+                                <label for="discount_type">单位:</label>
+                                <select id="discount_type" name="discount_type" class="form-control">
+                                    <option></option>
+                                </select>
+                            </div>
+                            <div class="col-4 form-inline">
+                                <label for="unit_price">单价:</label>
+                                <input id="unit_price" type="number" name="unit_price" class="form-control">
+                            </div>
+                        </div>
+                        <div class="row mt-2" v-if="type=='出库'">
+                            <label for="out_storage_strategy" class="col-2">出库策略:</label>
+                            <select id="out_storage_strategy" name="out_storage_strategy" class="col-5 form-control">
+                                <option>起步</option>
+                                <option>默认</option>
+                                <option>特征</option>
+                            </select>
+                        </div>
+                        <div class="row mt-2" v-if="type=='出库'">
+                            <label for="describe" class="col-2">特征:</label>
+                            <input id="describe" type="text" :value="pond" v-if="pond" disabled class="col-5 form-control"/>
+                            <button type="button" class="btn btn-dark col-2" v-else @click="showModal()">添加特征</button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+
+                    <div class="row mt-3">
+                        <label for="discount_value" class="col-2">减免值</label>
+                        <input id="discount_value" type="number" name="discount_value" class="col-6 form-control">
+                    </div>
+                    <div class="row mt-3">
+                        <label for="unit_id" class="col-2">单位</label>
+                        <select id="unit_id" name="unit_id" class="col-3 form-control">
+                            <option></option>
+                        </select>
+                    </div>
+
+            <div class="row mt-3 offset-1">
+                <button type="submit" class="btn btn-success col-7">提交</button>
+            </div>
+        </form>
+    </div>
+@stop
+
+@section("lastScript")
+    <script>
+        new Vue({
+            el:"#container",
+            data:{
+                priceTypes : [],
+                types : [],
+                discountTypes : [],
+                units : [],
+                ponds : [""],
+                len : 0,
+                type : "",
+            },
+            methods:{
+                addDom(){
+                    this.ponds.push("");
+                    this.len++;
+                },
+                delDom(index){
+                    this.$delete(this.ponds,index);
+                    this.len--;
+                },
+                showModal(){
+                    $("#modal").modal("show");
+                }
+            },
+        });
+    </script>
+@stop

+ 58 - 0
resources/views/maintenance/priceModel/operation/index.blade.php

@@ -0,0 +1,58 @@
+@extends('layouts.app')
+@section('title')计费模型-仓储计费@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.priceModel.operation.menu')@endcomponent
+    </div>
+    <div class="container-fluid mt-2" id="container">
+        <div id="form_div"></div>
+        <table class="table table-hover table-striped text-nowrap">
+            <tr>
+                <th>序号</th>
+                <th>操作</th>
+                <th>名称</th>
+                <th>类型</th>
+                <th>项目</th>
+                <th>特征</th>
+                <th>计量</th>
+                <th>单位</th>
+                <th>单价</th>
+                <th>备注</th>
+                <th>录入时间</th>
+                <th>操作</th>
+            </tr>
+            <tr v-for="model in models">
+                <td></td>
+            </tr>
+        </table>
+    </div>
+@stop
+
+@section("lastScript")
+    <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
+    <script>
+        new Vue({
+            el:"#container",
+            data:{
+                models : [],
+                owners : [],
+            },
+            mounted(){
+                let data=[
+                    [
+                        {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的项目'],
+                            placeholder:['项目','定位或多选项目'],data:this.owners},
+                        {name: 'name', type: 'input', tip: '价格名称:可在左侧增加百分号(%)进行模糊搜索', placeholder: '价格名称'},
+                    ]
+                ];
+                this.form = new query({
+                    el:"#form_div",
+                    condition:data,
+                });
+                this.form.init();
+            },
+        });
+    </script>
+@stop

+ 15 - 0
resources/views/maintenance/priceModel/operation/menu.blade.php

@@ -0,0 +1,15 @@
+@component('maintenance.priceModel.menu')@endcomponent
+<div class="container-fluid nav4">
+    <div class="card menu-third" >
+        <ul class="nav nav-pills">
+            @can('计费模型-作业-查询')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/operation')}}" :class="{active:isActive('',4)}">查询</a>
+            </li> @endcan
+            @can('计费模型-作业-录入')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/operation/create')}}" :class="{active:isActive('create',4)}">录入</a>
+            </li> @endcan
+        </ul>
+    </div>
+</div>

+ 66 - 0
resources/views/maintenance/priceModel/storage/create.blade.php

@@ -0,0 +1,66 @@
+@extends('layouts.app')
+@section('title')计费模型-仓储计费@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.priceModel.storage.menu')@endcomponent
+    </div>
+    <div class="container-fluid mt-2 card" id="container">
+        <form method="GET" action="{{url('')}}" class="card-body offset-3">
+            <div class="row">
+                <label for="priceType" class="col-2">计费类型</label>
+                <select id="priceType" name="priceType" class="col-3 form-control">
+                    <option></option>
+                </select>
+            </div>
+            <div class="row mt-3">
+                <label for="type" class="col-2">用仓类型</label>
+                <select id="type" name="type" class="col-3 form-control">
+                    <option></option>
+                </select>
+            </div>
+            <div class="row mt-3">
+                <label for="minimum_area" class="col-2">最低起租面积</label>
+                <input id="minimum_area" type="text" name="minimum_area" class="col-6 form-control">
+            </div>
+            <div class="row mt-3">
+                <label for="price" class="col-2">单价</label>
+                <input id="price" type="number" name="price" class="col-6 form-control">
+            </div>
+            <div class="row mt-3">
+                <label for="discount_type" class="col-2">减免类型</label>
+                <select id="discount_type" name="discount_type" class="col-3 form-control">
+                    <option></option>
+                </select>
+            </div>
+            <div class="row mt-3">
+                <label for="discount_value" class="col-2">减免值</label>
+                <input id="discount_value" type="number" name="discount_value" class="col-6 form-control">
+            </div>
+            <div class="row mt-3">
+                <label for="unit_id" class="col-2">单位</label>
+                <select id="unit_id" name="unit_id" class="col-3 form-control">
+                    <option></option>
+                </select>
+            </div>
+            <div class="row mt-3 offset-1">
+                <button type="submit" class="btn btn-success col-7">提交</button>
+            </div>
+        </form>
+    </div>
+@stop
+
+@section("lastScript")
+    <script>
+        new Vue({
+            el:"#container",
+            data:{
+                priceTypes : [],
+                types : [],
+                discountTypes : [],
+                units : [],
+            },
+        });
+    </script>
+@stop

+ 38 - 0
resources/views/maintenance/priceModel/storage/index.blade.php

@@ -0,0 +1,38 @@
+@extends('layouts.app')
+@section('title')计费模型-仓储计费@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.priceModel.storage.menu')@endcomponent
+    </div>
+    <div class="container-fluid mt-2" id="container">
+        <table class="table table-hover table-striped text-nowrap">
+            <tr>
+                <th>序号</th>
+                <th>计费类型</th>
+                <th>用仓类型</th>
+                <th>最低起租面积</th>
+                <th>单价</th>
+                <th>减免类型</th>
+                <th>减免值</th>
+                <th>录入时间</th>
+                <th>操作</th>
+            </tr>
+            <tr v-for="model in models">
+                <td></td>
+            </tr>
+        </table>
+    </div>
+@stop
+
+@section("lastScript")
+    <script>
+        new Vue({
+            el:"#container",
+            data:{
+                models : [],
+            },
+        });
+    </script>
+@stop

+ 15 - 0
resources/views/maintenance/priceModel/storage/menu.blade.php

@@ -0,0 +1,15 @@
+@component('maintenance.priceModel.menu')@endcomponent
+<div class="container-fluid nav4">
+    <div class="card menu-third" >
+        <ul class="nav nav-pills">
+            @can('计费模型-仓储')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/storage')}}" :class="{active:isActive('',4)}">查询</a>
+            </li> @endcan
+            @can('计费模型-仓储-录入')
+            <li class="nav-item">
+                <a class="nav-link" href="{{url('maintenance/priceModel/storage/create')}}" :class="{active:isActive('create',4)}">录入</a>
+            </li> @endcan
+        </ul>
+    </div>
+</div>

+ 2 - 11
resources/views/maintenance/waybillPriceModel/create.blade.php → resources/views/maintenance/priceModel/waybillPriceModel/create.blade.php

@@ -4,12 +4,12 @@
 @section('content')
     <div id="nav2">
         @component('maintenance.menu')@endcomponent
-        @component('maintenance.waybillPriceModel.menu')@endcomponent
+        @component('maintenance.priceModel.waybillPriceModel.menu')@endcomponent
     </div>
     <div class="container-fluid" id="list">
         <div class="card col-md-8 offset-md-2">
             <div class="card-body">
-                <form method="POST" action="{{ url('maintenance/waybillPriceModel') }}">
+                <form method="POST" action="{{ url('maintenance/priceModel/waybillPriceModel') }}">
                     @if(Session::has('successTip'))
                         <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
                     @endif
@@ -173,15 +173,6 @@
                             _this.cities=response.data.cities;
                         }
                    );
-                   /*let _this=this;
-                   let province_id=this.inputting.WaybillPriceModel.province_id;
-                   this.provinces.forEach(function (province) {
-                       if(province.id+''===province_id+''){
-                           _this.cities=province.cities;
-                           return
-                       }
-                       return null
-                   })*/
                }
            },
         });

+ 2 - 13
resources/views/maintenance/waybillPriceModel/edit.blade.php → resources/views/maintenance/priceModel/waybillPriceModel/edit.blade.php

@@ -3,7 +3,7 @@
 
 @section('content')
     <div id="nav2">
-        @component('maintenance.waybillPriceModel.menu')
+        @component('maintenance.priceModel.waybillPriceModel.menu')
                 <li class="nav-item">
                     <a class="nav-link" href="{{URL::current()}}" :class="{active:isActive('edit',4)}">修改</a>
                 </li>
@@ -12,7 +12,7 @@
     <div class="container-fluid" id="list">
         <div class="card">
             <div class="card-body">
-                <form method="POST" action='{{url("maintenance/waybillPriceModel/{$waybillPriceModel->id}")}}'>
+                <form method="POST" action='{{url("maintenance/priceModel/waybillPriceModel/{$waybillPriceModel->id}")}}'>
                     @csrf
                     @method('PUT')
                     <div class="form-group row">
@@ -184,17 +184,6 @@
                     );
                 }
             },
-/*                changeProvince(){
-                    let _this=this;
-                    let province_id=this.inputting.WaybillPriceModel.province_id;
-                    this.provinces.forEach(function (province) {
-                        if(province.id+''===province_id+''){
-                            _this.cities=province.cities;
-                            return
-                        }
-                        return null
-                    })
-                }*/
         });
 
     </script>

+ 1 - 1
resources/views/maintenance/waybillPriceModel/import.blade.php → resources/views/maintenance/priceModel/waybillPriceModel/import.blade.php

@@ -4,7 +4,7 @@
 @section('content')
     <div id="nav2">
         @component('maintenance.menu')@endcomponent
-        @component('maintenance.waybillPriceModel.menu')@endcomponent
+        @component('maintenance.priceModel.waybillPriceModel.menu')@endcomponent
     </div>
     <div class="container-fluid">
         <div class="card col-md-8 offset-md-2">

+ 3 - 4
resources/views/maintenance/waybillPriceModel/index.blade.php → resources/views/maintenance/priceModel/waybillPriceModel/index.blade.php

@@ -1,11 +1,10 @@
-
 @extends('layouts.app')
 @section('title')运输价格模型@endsection
 
 @section('content')
     <span id="nav2">
         @component('maintenance.menu')@endcomponent
-        @component('maintenance.waybillPriceModel.menu')@endcomponent
+        @component('maintenance.priceModel.waybillPriceModel.menu')@endcomponent
     </span>
     <div id="list">
     <div class="container-fluid">
@@ -106,12 +105,12 @@
             },
             methods:{
                 edit:function(id){
-                    location.href = "{{url('maintenance/waybillPriceModel')}}/"+id+"/edit";
+                    location.href = "{{url('maintenance/priceModel/waybillPriceModel')}}/"+id+"/edit";
                 },
                 destroy:function(waybillPriceModel){
                     if(!confirm('确定要删除该计费模型吗?')){return};
                     let data=this;
-                    let url = "{{url('maintenance/waybillPriceModel')}}/"+waybillPriceModel.id;
+                    let url = "{{url('maintenance/priceModel/waybillPriceModel')}}/"+waybillPriceModel.id;
                     axios.delete(url,{id:waybillPriceModel.id})
                         .then(function (response) {
                             if(response.data.success){

+ 5 - 4
resources/views/maintenance/waybillPriceModel/menu.blade.php → resources/views/maintenance/priceModel/waybillPriceModel/menu.blade.php

@@ -1,17 +1,18 @@
-<div class="container-fluid nav3">
+@component('maintenance.priceModel.menu')@endcomponent
+<div class="container-fluid nav4">
     <div class="card menu-third" >
         <ul class="nav nav-pills">
             @can('计费模型-查询')
                 <li class="nav-item">
-                    <a class="nav-link" href="{{url('maintenance/waybillPriceModel')}}" :class="{active:isActive('',3)}">查询</a>
+                    <a class="nav-link" href="{{url('maintenance/priceModel/waybillPriceModel')}}" :class="{active:isActive('',4)}">查询</a>
                 </li> @endcan
             @can('计费模型-录入')
                 <li class="nav-item">
-                    <a class="nav-link" href="{{url('maintenance/waybillPriceModel/create')}}" :class="{active:isActive('create',3)}">录入</a>
+                    <a class="nav-link" href="{{url('maintenance/priceModel/waybillPriceModel/create')}}" :class="{active:isActive('create',4)}">录入</a>
                 </li> @endcan
             @can('计费模型-录入')
                 <li class="nav-item">
-                    <a class="nav-link" href="{{url('maintenance/waybillPriceModel/excel/goImport')}}" :class="{active:isActive('goImport',4)}">导入</a>
+                    <a class="nav-link" href="{{url('maintenance/priceModel/waybillPriceModel/excel/goImport')}}" :class="{active:isActive('goImport',5)}">导入</a>
                 </li> @endcan
             {{$slot}}
         </ul>

+ 37 - 0
resources/views/maintenance/processMethod/create.blade.php

@@ -0,0 +1,37 @@
+@extends('layouts.app')
+@section('title')作业类型-录入@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.processMethod.menu')@endcomponent
+    </div>
+    <div class="container-fluid card" id="container">
+       <form class="card-body offset-3" method="GET" action="{{url('')}}">
+            <div class="row">
+                <label for="name" class="col-2">类型</label>
+                <input type="text" id="name" name="name" class="form-control col-5">
+            </div>
+           <div class="row mt-2">
+               <label for="unit_id" class="col-2">单位</label>
+               <select id="unit_id" name="unit_id" class="form-control col-2">
+                   <option> </option>
+               </select>
+           </div>
+            <div class="row mt-4 offset-1">
+                <button type="submit" class="btn btn-success col-6">提交</button>
+            </div>
+       </form>
+    </div>
+@stop
+
+@section("lastScript")
+    <script>
+        new Vue({
+            el:"#container",
+            data : {
+                units : [],
+            },
+        });
+    </script>
+@stop

+ 24 - 0
resources/views/maintenance/processMethod/index.blade.php

@@ -0,0 +1,24 @@
+@extends('layouts.app')
+@section('title')作业类型@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.processMethod.menu')@endcomponent
+    </div>
+    <div class="container-fluid card">
+        <table class="table table-hover table-striped text-nowrap card-body mt-2">
+            <tr>
+                <th>ID</th>
+                <th>类型</th>
+                <th>单位</th>
+                <th>创建时间</th>
+                <th>操作</th>
+            </tr>
+        </table>
+    </div>
+@stop
+
+@section("lastScript")
+
+@stop

+ 14 - 0
resources/views/maintenance/processMethod/menu.blade.php

@@ -0,0 +1,14 @@
+<div class="container-fluid nav3">
+    <div class="card menu-third" >
+        <ul class="nav nav-pills">
+            @can('作业类型-查询')
+                <li class="nav-item">
+                    <a class="nav-link" href="{{url('maintenance/processMethod')}}" :class="{active:isActive('',3)}">查询</a>
+                </li> @endcan
+            @can('作业类型-录入')
+                <li class="nav-item">
+                    <a class="nav-link" href="{{url('maintenance/processMethod/create')}}" :class="{active:isActive('create',3)}">录入</a>
+                </li> @endcan
+        </ul>
+    </div>
+</div>

+ 2 - 1
resources/views/maintenance/role/index.blade.php

@@ -71,7 +71,7 @@
                 this.form = new query({
                     el: '#form_div',
                     condition: data,
-                })
+                });
                 this.form.init();
                 let column = [
                     {name:'id',value: 'ID'},
@@ -84,6 +84,7 @@
                 let header = new Header({
                     column: column,
                     data: this.roles,
+                    fixedTop: ($('#form_div').height())+2,
                     restorationColumn: 'id',
                 });
                 header.init();

+ 24 - 0
resources/views/maintenance/userOwnerGroup/create.blade.php

@@ -0,0 +1,24 @@
+@extends('layouts.app')
+@section('title')项目组-录入@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.userOwnerGroup.menu')@endcomponent
+    </div>
+    <div class="container-fluid card">
+       <form class="card-body offset-3" method="GET" action="{{url('')}}">
+            <div class="row">
+                <label for="name" class="col-2">小组名称</label>
+                <input type="text" id="name" name="name" class="form-control col-5">
+            </div>
+            <div class="row mt-4 offset-1">
+                <button type="submit" class="btn btn-success col-6">提交</button>
+            </div>
+       </form>
+    </div>
+@stop
+
+@section("lastScript")
+
+@stop

+ 24 - 0
resources/views/maintenance/userOwnerGroup/index.blade.php

@@ -0,0 +1,24 @@
+@extends('layouts.app')
+@section('title')项目组@endsection
+
+@section('content')
+    <div id="nav2">
+        @component('maintenance.menu')@endcomponent
+        @component('maintenance.userOwnerGroup.menu')@endcomponent
+    </div>
+    <div class="container-fluid card">
+        <table class="table table-hover table-striped text-nowrap card-body mt-2">
+            <tr>
+                <th>ID</th>
+                <th>名称</th>
+                <th>创建时间</th>
+                <th>操作</th>
+            </tr>
+
+        </table>
+    </div>
+@stop
+
+@section("lastScript")
+
+@stop

+ 14 - 0
resources/views/maintenance/userOwnerGroup/menu.blade.php

@@ -0,0 +1,14 @@
+<div class="container-fluid nav3">
+    <div class="card menu-third" >
+        <ul class="nav nav-pills">
+            @can('客户-查询')
+                <li class="nav-item">
+                    <a class="nav-link" href="{{url('maintenance/userOwnerGroup')}}" :class="{active:isActive('',3)}">查询</a>
+                </li> @endcan
+            @can('客户-录入')
+                <li class="nav-item">
+                    <a class="nav-link" href="{{url('maintenance/userOwnerGroup/create')}}" :class="{active:isActive('create',3)}">录入</a>
+                </li> @endcan
+        </ul>
+    </div>
+</div>

+ 48 - 10
resources/views/rejected/search/general.blade.php

@@ -8,7 +8,7 @@
     </div>
     <div class="container-fluid">
         <div>
-{{--        <div style="min-width: 2070px;">--}}
+            {{--        <div style="min-width: 2070px;">--}}
             <div class="d-none" id="list">
                 @if(Session::has('successTip'))
                     <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
@@ -117,7 +117,15 @@
                                 </tr>
                             </table>
                         </td>
-                        <td class="text-muted" style="max-width: 190px">@{{rejectedBill.remark}}</td>
+                        {{--                        <td class="text-muted" style="max-width: 190px">@{{rejectedBill.remark}}</td>--}}
+                        <td style="min-width:150px;">
+                            @can('退货管理-编辑备注')
+                                <textarea class="form-control form-control-sm"   :rows="rejectedBill.remark?Math.ceil(rejectedBill.remark.length/8):2"  cols=8
+                                          @change="updateRejectedBillRemark($event)" :value="rejectedBill.remark" :data_id="rejectedBill.id">@{{ rejectedBill.remark }}</textarea>
+                            @else
+                                <span>@{{rejectedBill.remark}}</span>
+                            @endcan
+                        </td>
                         <td class="text-muted">@{{rejectedBill.operator_name}}</td>
                         @can('退货管理-编辑')
                             <td>
@@ -149,7 +157,7 @@
             rejectedBill.detailFolding=true;
         })
         let owners=[
-            @foreach($owners as $owner)
+                @foreach($owners as $owner)
             {id:'{{$owner->id}}',name:'{{$owner->name}}'},
             @endforeach
         ];
@@ -185,18 +193,18 @@
                 rejectedBills:rejectedBills,
                 rejectedBills_checkBoxes:[],
                 owners:[
-                    @foreach($owners as $owner)
+                        @foreach($owners as $owner)
                     {name:'{{$owner->id}}',value:'{{$owner->name}}'},
                     @endforeach
                 ],
                 issueIds:{!! $issueIds !!},
                 logistics:[
-                    @foreach($logistics as $logistic)
+                        @foreach($logistics as $logistic)
                     {name:'{{$logistic->id}}',value:'{{$logistic->name}}'},
                     @endforeach
                 ],
                 qualityLabels:[
-                    @foreach($qualityLabels as $qualityLabel)
+                        @foreach($qualityLabels as $qualityLabel)
                     {name:'{{$qualityLabel->id}}',value:'{{$qualityLabel->name}}'},
                     @endforeach
                 ],
@@ -214,6 +222,7 @@
                         {name:'logistic_number',type:'input',tip:'原单单号:可在两侧增加百分号(%)进行模糊搜索',placeholder:'原单单号'},
                         {name:'is_checked',type:'select',placeholder: '是否审核',data:[{name:1,value:'已审核'},{name:0,value:'未审核'}]},
                         {name:'id_logistic_return',type:'select',placeholder: '快递名称',data:this.logistics},
+                        {name:'remark',type:'input',tip:'退单备注:默认查询15天以内记录信息',placeholder: '退单备注'},
                     ],[
                         {name:'created_at_end',type:'dateTime',tip:'选择显示指定日期的结束时间'},
                         {name:'barcode_goods',type:'input',tip:'商品条码:可模糊匹配右边未填完的部分,按回车提交',placeholder:'商品条码'},
@@ -221,7 +230,7 @@
                         {name:'mobile_sender',type:'input',tip:'寄件人手机:输入完成敲回车提交',placeholder:'寄件人手机'},
                         {name:'checked_numbers',type:'input',tip:'审核批次号:支持右位留空的模糊搜索',placeholder:'审核批次号'},
                         {name:'is_loaded',type:'select',placeholder: '是否入库',data:[{name:1,value:'是'},{name:0,value:'否'},
-                        {name:'null',value:'无需入库'},{name:2,value:'待推单'},{name:4,value:'待确认'},{name:3,value:'交互异常'}]},
+                                {name:'null',value:'无需入库'},{name:2,value:'待推单'},{name:4,value:'待确认'},{name:3,value:'交互异常'}]},
                         {name:'is_issue',type:'select',data:[{name:'true',value:'有'},{name:'false',value:'无'}],tip:'问题件',placeholder:'问题件'}
                     ]
                 ];
@@ -291,6 +300,36 @@
                 }
             },
             methods:{
+                updateRejectedBillRemark:function (e) {
+                    let target = $(e.target);
+                    let _this = this;
+                    let id = target.attr('data_id');
+                    let remark = target.val();
+                    let ajaxUrl= '{{url("rejected/changeRejectedBillRemark")}}';
+                    axios.post(ajaxUrl,{'id':id,'remark':remark}).then(function (response) {
+                        if(response.data.success){
+                            _this.updateRejectedBills(id,remark);
+                            tempTip.setDuration(2000);
+                            tempTip.showSuccess('备注修改成功');
+                        }else{
+                            tempTip.setDuration(3000);
+                            tempTip.show('备注修改失败!'+response.data.fail_info);
+                        }
+                    }).catch(function (err) {
+                        tempTip.setDuration(3000);
+                        tempTip.show('备注修改失败!网络异常:'+err);
+                    });
+
+                },
+                // 更新表格数据
+                updateRejectedBills(id,remark){
+                    this.rejectedBills.some(function(rejectedBill){
+                        if(parseInt(rejectedBill.id) === parseInt(id)){
+                            rejectedBill.remark = remark;
+                            return true;
+                        }
+                    })
+                },
                 edit(id){
                     window.location.href=editUrl+id+"/edit";
                     // window.open(editUrl+id+"/edit",'_blank') ;
@@ -372,7 +411,7 @@
                         alert('网络连接错误:'+e);
                         tempTip.setDuration(2500);
                         tempTip.show('审核勾选内容失败,网络连接错误:'+e);
-                        console.log(e);
+
                     });
                     $(e.target).val("")
                 },
@@ -415,7 +454,6 @@
                         alert('网络连接错误:'+e);
                         tempTip.setDuration(2500);
                         tempTip.show('审核勾选内容失败,网络连接错误:'+e);
-                        console.log(e);
                     })
                 },
                 confirmBeStored:function($e,id){
@@ -437,7 +475,7 @@
                         alert('确认失败,网络连接错误:'+e);
                         tempTip.setDuration(2500);
                         tempTip.show('确认失败,网络连接错误:'+e);
-                        console.log(e);
+
                     })
                 },
                 finishAll:function(){

+ 2 - 0
resources/views/store/checkingReceive/show.blade.php

@@ -310,6 +310,8 @@
                     .then((res)=>{
                         if (res.data.success){
                             item.counted_amount = counted_amount;
+                            item.imported_diff_amount = res.data.data.imported_diff_amount;
+                            item.asn_diff_amount = res.data.data.asn_diff_amount;
                             this.disabledItemId = "";
                             tempTip.setDuration(2000);
                             tempTip.showSuccess("实盘数量成功修改为“"+counted_amount+"”");

+ 8 - 0
resources/views/waybill/authorityMenu.blade.php

@@ -0,0 +1,8 @@
+@extends('layouts.app')
+@section('title')入库管理@endsection
+
+@section('content')
+    <span id="nav2">
+        @component('waybill.menu')@endcomponent
+    </span>
+@endsection

+ 28 - 6
routes/web.php

@@ -33,6 +33,7 @@ Route::group(['prefix'=>'password'],function(){
 Route::get('denied',function (){return view('exception.authority');});
 /** 基础设置 */
 Route::group(['prefix'=>'maintenance'],function(){
+
     /** 商品 */
     Route::group(['prefix'=>'commodity'],function(){
         /** 导出 */
@@ -70,12 +71,25 @@ Route::group(['prefix'=>'maintenance'],function(){
         });
     });
     /** 计费模型 */
-    Route::group(['prefix'=>'waybillPriceModel'],function(){
-        /** excel */
-        Route::group(['prefix'=>'excel'],function(){
-            Route::get('goImport',function (){return view('maintenance.waybillPriceModel.import');});
+    Route::group(['prefix'=>'priceModel'],function() {
+        Route::group(['prefix'=>'waybillPriceModel'],function(){
+            /** excel */
+            Route::group(['prefix'=>'excel'],function(){
+                Route::get('goImport',function (){return view('maintenance.priceModel.waybillPriceModel.import');});
+            });
+            Route::get('cities/{province_id}','WaybillPriceModelsController@getCities');
+        });
+        Route::resource('waybillPriceModel','WaybillPriceModelsController');
+
+        Route::group(['prefix'=>'storage'],function(){
+            Route::get('create','PriceModelController@storeCreate');
+        });
+        Route::get('storage','PriceModelController@storeIndex');
+
+        Route::group(['prefix'=>'operation'],function(){
+            Route::get('create','PriceModelController@operationCreate');
         });
-        Route::get('cities/{province_id}','WaybillPriceModelsController@getCities');
+        Route::get('operation','PriceModelController@operationIndex');
     });
 
     Route::get('syncRedisLogs','LogController@syncRedisLogs');
@@ -100,7 +114,10 @@ Route::group(['prefix'=>'maintenance'],function(){
     Route::resource('tutorial', 'TutorialController');
     Route::resource('userLabor','UserLaborController');
     Route::resource('paperBox', 'PaperBoxController');
-    Route::resource('waybillPriceModel','WaybillPriceModelsController');
+    Route::resource('customer', 'CustomerBaseController');
+    Route::resource('userOwnerGroup', 'UserOwnerGroupController');
+    Route::resource('processMethod', 'ProcessMethodController');
+    Route::resource('feature', 'FeatureController');
 });
 Route::get('maintenance', function () {return view('maintenance.index');});
 
@@ -182,6 +199,7 @@ Route::group(['prefix'=>'rejected'],function(){
     Route::any('export', 'RejectedController@export');
     Route::any('exportAnalyze', 'RejectedController@exportAnalyze');
     Route::post('ajaxGetRejected', 'RejectedController@ajaxGetRejected');
+    Route::post('changeRejectedBillRemark', 'RejectedController@changeRejectedBillRemark');
 });
 Route::resource('rejected', 'RejectedController');
 
@@ -466,6 +484,10 @@ Route::group(['prefix'=>'customer'],function(){
         Route::get('create','CustomerController@projectCreate');
         Route::get('area','CustomerController@projectArea');
     });
+    Route::group(['prefix'=>'finance'],function(){
+        Route::get('instantBill','CustomerController@financeInstantBill');
+        Route::get('billConfirmation','CustomerController@financeBillConfirmation');;
+    });
     Route::get('relating',function (){return view('customer.relating');});
 });
 

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff