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

客户管理逻辑部分提交

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

+ 120 - 0
app/Console/Commands/CreateOwnerReport.php

@@ -0,0 +1,120 @@
+<?php
+
+namespace App\Console\Commands;
+
+use App\OwnerAreaReport;
+use App\OwnerBillReport;
+use App\OwnerReport;
+use App\Services\common\BatchUpdateService;
+use App\Services\LogService;
+use Illuminate\Console\Command;
+use Illuminate\Support\Facades\DB;
+
+class CreateOwnerReport extends Command
+{
+    /**
+     * The name and signature of the console command.
+     *
+     * @var string
+     */
+    protected $signature = 'createOwnerReport';
+
+    /**
+     * The console command description.
+     *
+     * @var string
+     */
+    protected $description = 'create owner report';
+
+    /**
+     * Create a new command instance.
+     *
+     * @return void
+     */
+    public function __construct()
+    {
+        parent::__construct();
+    }
+
+    /**
+     * TODO 1号生成或修改上月报表  此处假设每月生成报表数 不足1000,超过此数可能在SQL执行上溢出
+     *
+     * @return void
+     */
+    public function handle()
+    {
+        //转化日期格式 取得上月日期与天数 & 两月前月份
+        $year = (int)date('Y');
+        $month = (int)date('m');
+        if ($month == 1){
+            $year--;
+            $lastMonth = '12';
+        }else $lastMonth = ($month-1) < 10 ? "0".($month-1) : ($month-1);
+        $historyYear = $year;
+        if (($month-1) == 1){
+            $historyYear--;
+            $historyMonth = '12';
+        }else $historyMonth = ($month-2) < 10 ? "0".($month-2) : ($month-2);
+        $lastDay = date("d",strtotime("$year-$lastMonth +1 month -1 day"));
+
+        //获取上月面积与报表
+        $areas = OwnerAreaReport::query()->with(['owner'=>function($query){
+            $query->select('id',"code");
+        }])->where("counting_month","like",$year."-".$lastMonth."%")->get();
+        $reports = OwnerReport::query()->where("counting_month","like",$year."-".$lastMonth."%")->orWhere("counting_month","like",$historyYear."-".$historyMonth."%")->get();
+        $bills = OwnerBillReport::query()->where("counting_month","like",$year."-".$lastMonth."%")->get();
+
+        //日均单量统计
+        $query = DB::raw("select  count(*) c,CUSTOMERID from DOC_ORDER_HEADER where EDITTIME >= to_date('$year-$lastMonth-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and EDITTIME <= to_date('$year-$lastMonth-$lastDay 23:59:59','yyyy-mm-dd hh24:mi:ss') group by CUSTOMERID");
+        $orderStatistic = DB::connection("oracle")->select($query);
+        $map = [];
+        foreach ($orderStatistic as $item){
+            $map[$item->customerid] = round($item->c / $lastDay,2);
+        }
+
+        //已存在的报表记录
+        $reportMap = [];
+        $historyReportMap = [];
+        foreach ($reports as $report){
+            if ($report->counting_month == ($historyYear."-".$historyMonth)){
+                $historyReportMap[$report->owner_id."_".$report->counting_month] = $report->current_month_counting_area;
+                continue;
+            }
+            $reportMap[$report->owner_id."_".$report->counting_month] = $report->id;
+        }
+
+        //组装账单记录
+        $billMap = [];
+        foreach ($bills as $index => $bill){
+            $bill[$bill->owner_id."_".$bill->counting_month] = $index;
+        }
+
+        //组装报表记录数据
+        $updateReports = [[
+            "id","daily_average_order_amount","current_month_counting_area","owner_bill_report_id"
+        ]];
+        $createReports = [];
+        foreach ($areas as $area){
+            if ($reportMap[$area->owner_id."_".$area->counting_month] ?? false){
+                $updateReports[] = [
+                    "id"=>$reportMap[$area->owner_id."_".$area->counting_month],
+                    "daily_average_order_amount"=>$area->owner ? ($map[$area->owner->code] ?? 0) : 0,
+                    "current_month_counting_area"=>$area->accounting_area ?? 0,
+                    "owner_bill_report_id" => $billMap[$area->owner_id."_".$area->counting_month] ?? 0,
+                ];
+            }else $createReports[] = [
+                "owner_id"=>$area->owner_id,
+                "counting_month"=>$area->counting_month."-01",
+                "daily_average_order_amount"=>$area->owner ? ($map[$area->owner->code] ?? 0) : 0,
+                "current_month_counting_area"=>$area->accounting_area ?? 0,
+                "owner_bill_report_id" => $billMap[$area->owner_id."_".$area->counting_month] ?? 0,
+                "last_month_counting_area" => $historyReportMap[$area->owner_id."_".($historyYear."-".$historyMonth)] ?? 0,
+            ];
+        }
+        //执行生成或修改
+        LogService::log(__METHOD__,"生成货主报表",json_encode($createReports));
+        LogService::log(__METHOD__,"修改货主报表",json_encode($updateReports));
+        app(BatchUpdateService::class)->batchUpdate('owner_reports', $updateReports);
+        DB::table("owner_reports")->insert($createReports);
+    }
+}

+ 2 - 2
app/Customer.php

@@ -7,8 +7,8 @@ use Illuminate\Database\Eloquent\Model;
 class Customer extends Model
 {
     protected $fillable = [
-        "code",         //客户名称
-        "name",         //客户代码
+        "code",         //客户代码
+        "name",         //客户名称
         "company_name"  //公司名称
     ];
 }

+ 59 - 2
app/Http/Controllers/CustomerController.php

@@ -2,9 +2,13 @@
 
 namespace App\Http\Controllers;
 
+use App\Services\OwnerReportService;
+use Exception;
+use Illuminate\Database\Eloquent\Builder;
 use Illuminate\Http\Request;
 use Illuminate\Http\Response;
 use Illuminate\Support\Facades\Gate;
+use Illuminate\Support\Facades\Http;
 
 class CustomerController extends Controller
 {
@@ -16,13 +20,66 @@ class CustomerController extends Controller
     public function projectReport(Request $request)
     {
         if(!Gate::allows('客户管理-项目-报表')){ return view('customer.index');  }
-        $reports = app("ownerReportService")->paginate($request->input());
-        return response()->view('customer.project.report',compact("reports"));
+        $withs = ["ownerBillReport","owner"=>function($query){
+            /** @var Builder $query */
+            $query->select("id","name","deleted_at","created_at","customer_id","user_owner_group_id")
+                ->with(["customer","userOwnerGroup"]);
+        }];
+        $ownerGroups = app('userOwnerGroupService')->getSelection();
+        $customers = app('customerService')->getSelection();
+        $owners = app('ownerService')->getSelection();
+        $reports = app("ownerReportService")->paginate($request->input(),$withs);
+        return response()->view('customer.project.report',compact("reports","ownerGroups","customers","owners"));
+    }
+
+    public function projectReportExport(Request $request)
+    {
+        if(!Gate::allows('客户管理-项目-报表')){ return '没有权限';  }
+        /** @var OwnerReportService $service */
+        $service = app('ownerReportService');
+        $withs = ["ownerBillReport","owner"=>function($query){
+            /** @var Builder $query */
+            $query->select("id","name","deleted_at","created_at","customer_id","user_owner_group_id")
+                ->with(["customer","userOwnerGroup"]);
+        }];
+        if ($request->checkAllSign ?? false){
+            $params = $request->input();
+            unset($params['checkAllSign']);
+            $reports = $service->get($params,$withs);
+        }else $reports = $service->get(["id"=>$request->data ?? ''],$withs);
+        $column = ["项目小组","客户","子项目","状态","创建日期","在库时长","结算月","日均单量","结算月上月盘点面积","结算月盘点面积","初始账单金额","确认账单金额","确认日期"];
+        $list = [];
+        foreach ($reports as $report){
+            $list[] = [
+                $report->owner ? ($report->owner->userOwnerGroup ? $report->owner->userOwnerGroup->name : '') : '',
+                $report->owner ? ($report->owner->customer ? $report->owner->customer->name : '') : '',
+                $report->owner ? $report->owner->name : '',
+                $report->owner ? ($report->owner->deleted_at ? "冻结" : "激活") : '',
+                $report->owner ? (string)$report->owner->created_at : '',
+                $report->owner ? ($report->owner->created_at ? ((new \DateTime())->diff(new \DateTime($report->owner->created_at))->days)." 天"  : '') : '',
+                $report->counting_month,
+                $report->daily_average_order_amount,
+                $report->last_month_counting_area,
+                $report->current_month_counting_area,
+                $report->ownerBillReport ? $report->ownerBillReport->initial_fee : '',
+                $report->ownerBillReport ? $report->ownerBillReport->confirm_fee : '',
+                $report->ownerBillReport ? (string)$report->ownerBillReport->updated_at : '',
+            ];
+        }
+        $post = Http::post(config('go.export.url'),['type'=>'base','data'=>json_encode(["row"=>$column,"list"=>$list],JSON_UNESCAPED_UNICODE)]);
+        if ($post->status() == 500){
+            throw new Exception($post->header("Msg"));
+        }
+        return response($post,200, [
+            "Content-type"=>"application/octet-stream",
+            "Content-Disposition"=>"attachment; filename=客户项目报表-".date('ymdHis').'.xlsx',
+        ]);
     }
 
     public function projectIndex()
     {
         if(!Gate::allows('客户管理-项目-查询')){ return redirect('denied');  }
+        $customers = app('ownerService')->get();
         return response()->view('customer.project.index');
     }
 

+ 3 - 28
app/Http/Controllers/TestController.php

@@ -80,35 +80,10 @@ 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,
-                     'In_New_TraceID_C:'.$doc_asn_detail->new_traceid,
-                     'In_CustomerID:'.$doc_asn_detail->customerid,
-                     'In_SKU:'.$doc_asn_detail->sku,
-                     'In_ReceivedQty:'.$doc_asn_detail->receivedqty_each,
-                     'In_PackID:'.$doc_asn_detail->packid,
-                     'In_LotAtt01_C:'.$doc_asn_detail->lotatt01,
-                     'In_LotAtt02_C:'.$doc_asn_detail->lotatt02,
-                     'In_LotAtt04_C:'.$doc_asn_detail->lotatt04,
-                     'In_LotAtt05_C:'.$doc_asn_detail->lotatt05,
-                     'In_LotAtt08_C:'.$doc_asn_detail->lotatt08,
-                     'In_UserDefine1:'.$doc_asn_detail->userdefine1,
-                     'In_UserDefine2:'.$doc_asn_detail->userdefine2,
-                     'In_UserDefine3:'.$doc_asn_detail->userdefine3,
-                     'In_UserDefine4:'.$doc_asn_detail->userdefine4,
-                     'In_UserDefine5:'.$doc_asn_detail->userdefine5,
-                     'In_FMLocation:'.$doc_asn_detail->warehouseid,
-                     'In_TOLocation_C:'.$doc_asn_detail->warehouseid,
-                     'In_Operator:'.$doc_asn_detail->addwho,
-                     'In_UserID:'.$doc_asn_detail->addwho,
-                     'OUT_Return_Code:'.$result
-                 );*/
+
     public function test4(){
-        $owner_name = "BAOSHI";
-        $owner = app('ownerService')->first(["code"=>$owner_name,"name"=>$owner_name],["name"=>"or"]);
-        if (!$owner) $owner = app('ownerService')->create(["name"=>$owner_name, "code"=>$owner_name]);
-        dd($owner);
+        dd(round("1"/"30",2));
+
     }
 
     public function test2(){

+ 8 - 0
app/OwnerAreaReport.php

@@ -20,4 +20,12 @@ class OwnerAreaReport extends Model
     {   //货主
         return $this->hasOne(Owner::class,"id","owner_id");
     }
+
+    /* 结算月格式转换,仅截取至月
+     * 引用:CreateOwnerReport
+     */
+    public function getCountingMonthAttribute($value)
+    {
+        return substr($value,0,7);
+    }
 }

+ 8 - 0
app/OwnerBillReport.php

@@ -19,4 +19,12 @@ class OwnerBillReport extends Model
    {   //货主
        $this->hasOne(Owner::class,"id","owner_id");
    }
+
+    /* 结算月格式转换,仅截取至月
+     * 引用:CreateOwnerReport
+     */
+    public function getCountingMonthAttribute($value)
+    {
+        return substr($value,0,7);
+    }
 }

+ 9 - 1
app/OwnerReport.php

@@ -3,6 +3,7 @@
 namespace App;
 
 use App\Traits\ModelTimeFormat;
+use Carbon\Carbon;
 use Illuminate\Database\Eloquent\Model;
 
 class OwnerReport extends Model
@@ -16,7 +17,6 @@ class OwnerReport extends Model
         "last_month_counting_area",     //结算月上月盘点面积
         "owner_bill_report_id"          //账单ID
     ];
-
     public $timestamps = false;
 
     public function owner()
@@ -27,4 +27,12 @@ class OwnerReport extends Model
     {   //账单
         return $this->hasOne(OwnerBillReport::class,"id","owner_bill_report_id");
     }
+
+    /* 结算月格式转换,仅截取至月
+     * 引用:CreateOwnerReport
+     */
+    public function getCountingMonthAttribute($value)
+    {
+        return substr($value,0,7);
+    }
 }

+ 5 - 0
app/Providers/AppServiceProvider.php

@@ -2,11 +2,13 @@
 
 namespace App\Providers;
 
+use App\Customer;
 use App\Http\Controllers\Controller;
 use App\Services\CommodityService;
 use App\Services\common\BatchUpdateService;
 use App\Services\CommodityBarcodeService;
 use App\Services\common\DataHandlerService;
+use App\Services\CustomerService;
 use App\Services\DepositoryService;
 use App\Services\InventoryAccountMissionService;
 use App\Services\InventoryCompareService;
@@ -40,6 +42,7 @@ use App\Services\StoreCheckingReceiveItemService;
 use App\Services\StoreCheckingReceiveService;
 use App\Services\StoreItemService;
 use App\Services\StoreService;
+use App\Services\UserOwnerGroupService;
 use App\Services\WarehouseService;
 use App\Services\WaybillFinancialService;
 use App\Services\WeighExceptedService;
@@ -152,6 +155,8 @@ class AppServiceProvider extends ServiceProvider
         app()->singleton('batchUpdateService' , BatchUpdateService::class);
         app()->singleton('dataHandlerService',DataHandlerService::class);
         app()->singleton('depositoryService',DepositoryService::class);
+        app()->singleton('userOwnerGroupService',UserOwnerGroupService::class);
+        app()->singleton('customerService',CustomerService::class);
     }
 
     private function loadingRejectedModuleService(){

+ 14 - 0
app/Services/CustomerService.php

@@ -0,0 +1,14 @@
+<?php 
+
+namespace App\Services; 
+
+use App\Customer;
+
+Class CustomerService
+{
+    public function getSelection($column = ['id', 'name'])
+    {
+        return Customer::query()->select($column)->get();
+    }
+
+}

+ 28 - 1
app/Services/OwnerReportService.php

@@ -20,6 +20,28 @@ Class OwnerReportService
             'counting_month_end' => ['alias' => 'counting_month', 'endDate' => '-31'],
             'owner_id' => ['multi' => ','],
         ];
+        if ($params["owner_group_id"] ?? false){
+            $builder->whereHas('owner',function ($query)use(&$params){
+                /** @var Builder $query */
+                $query->where("user_owner_group_id",$params["owner_group_id"]);
+            });
+            unset($params["owner_group_id"]);
+        }
+        if ($params["customer_id"] ?? false){
+            $builder->whereHas('owner',function ($query)use(&$params){
+                /** @var Builder $query */
+                $query->where("customer_id",$params["customer_id"]);
+            });
+            unset($params["customer_id"]);
+        }
+        if ($params["status"] ?? false){
+            $builder->whereHas('owner',function ($query)use(&$params){
+                /** @var Builder $query */
+                if ($params["status"] == "激活") $query->whereNull("deleted_at");
+                else $query->whereNotNull("deleted_at");
+            });
+            unset($params["status"]);
+        }
         return app(QueryService::class)->query($params, $builder, $columnQueryRules,"owner_reports");
     }
 
@@ -32,9 +54,14 @@ Class OwnerReportService
 
     public function paginate(array $params, array $withs = null)
     {
-        $query = OwnerReport::query();
+        $query = OwnerReport::query()->orderByDesc('id');
         if ($withs)$query->with($withs);
         return $this->query($query,$params)->paginate($params["paginate"] ?? 50);
     }
 
+    public function getSql(array $params)
+    {
+
+    }
+
 }

+ 9 - 0
app/Services/OwnerService.php

@@ -4,6 +4,7 @@ namespace App\Services;
 
 use App\OracleBasCustomer;
 use App\Owner;
+use App\User;
 use Carbon\Carbon;
 use Illuminate\Support\Facades\Auth;
 
@@ -137,4 +138,12 @@ Class OwnerService
         return Owner::query()->whereIn('id',$user->getPermittingOwnerIdsAttribute()??[])->get();
     }
 
+    public function get()
+    {
+        /** @var User $user */
+        $user = Auth::user();
+        $ids = $user->getPermittingOwnerIdsAttribute();
+        return Owner::query();
+    }
+
 }

+ 15 - 0
app/Services/UserOwnerGroupService.php

@@ -0,0 +1,15 @@
+<?php 
+
+namespace App\Services; 
+
+
+use App\UserOwnerGroup;
+
+Class UserOwnerGroupService
+{
+    public function getSelection($column = ['id', 'name'])
+    {
+        return UserOwnerGroup::query()->select($column)->get();
+    }
+
+}

+ 87 - 10
resources/views/customer/project/report.blade.php

@@ -29,6 +29,28 @@
                     <td colspan="3" class="bg-light-cyanogen">账单信息</td>
                 </tr>
                 <tr class="text-nowrap" id="header"></tr>
+                <tr v-for="(report,i) in reports">
+                    <td>
+                        <label><input type="checkbox" :value="report.id" v-model="checkData"></label>
+                    </td>
+                    <td>
+
+                    </td>
+                    <td>@{{ i+1 }}</td>
+                    <td>@{{ report.ownerGroupName }}</td>
+                    <td>@{{ report.customerName }}</td>
+                    <td>@{{ report.ownerName }}</td>
+                    <td>@{{ report.ownerStatus }}</td>
+                    <td>@{{ report.ownerCreatedAt }}</td>
+                    <td>@{{ report.ownerStorageDuration }} 天</td>
+                    <td>@{{ report.countingMonth }}</td>
+                    <td>@{{ report.dailyAverageOrderAmount }}</td>
+                    <td>@{{ report.lastMonthCountingArea }}</td>
+                    <td>@{{ report.currentMonthCountingArea }}</td>
+                    <td>@{{ report.ownerBillReportInitialFee }}</td>
+                    <td>@{{ report.ownerBillReportConfirmFee }}</td>
+                    <td>@{{ report.ownerBillReportConfirmUpdatedAt }}</td>
+                </tr>
             </table>
         </div>
     </div>
@@ -37,25 +59,58 @@
 @section('lastScript')
     <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
     <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
     <script>
         let vue = new Vue({
             el:"#container",
             data:{
                 reports : [
                     @foreach($reports as $report)
-                    {},
+                    {
+                        id : "{{$report->id}}",
+                        ownerGroupName : "{{$report->owner ? ($report->owner->userOwnerGroup ? $report->owner->userOwnerGroup->name : '') : ''}}",
+                        customerName : "{{$report->owner ? ($report->owner->customer ? $report->owner->customer->name : '') : ''}}",
+                        ownerName : "{{$report->owner ? $report->owner->name : ''}}",
+                        ownerStatus : "{{$report->owner ? ($report->owner->deleted_at ? "冻结" : "激活") : ''}}",
+                        ownerStorageDuration : "{{$report->owner ? ($report->owner->created_at ? ((new DateTime())->diff(new DateTime($report->owner->created_at))->days)  : '') : ''}}",
+                        ownerCreatedAt : "{{$report->owner ? $report->owner->created_at : ''}}",
+                        countingMonth : "{{$report->counting_month}}",
+                        dailyAverageOrderAmount : "{{$report->daily_average_order_amount}}",
+                        lastMonthCountingArea : "{{$report->last_month_counting_area}}",
+                        currentMonthCountingArea : "{{$report->current_month_counting_area}}",
+                        ownerBillReportInitialFee : "{{$report->ownerBillReport ? $report->ownerBillReport->initial_fee : ''}}",
+                        ownerBillReportConfirmFee : "{{$report->ownerBillReport ? $report->ownerBillReport->confirm_fee : ''}}",
+                        ownerBillReportConfirmUpdatedAt : "{{$report->ownerBillReport ? $report->ownerBillReport->updated_at : ''}}",
+                    },
+                    @endforeach
+                ],
+
+                owners : [
+                    @foreach($owners as $owner)
+                    {name:"{{$owner->id}}",value:"{{$owner->name}}"},
+                    @endforeach
+                ],
+                workgroup : [
+                    @foreach($ownerGroups as $ownerGroup)
+                    {name:"{{$ownerGroup->id}}",value:"{{$ownerGroup->name}}"},
                     @endforeach
                 ],
-                owners : [],
-                workgroup : [],
-                customers : [],
-                status : [],
+                customers : [
+                    @foreach($customers as $customer)
+                    {name:"{{$customer->id}}",value:"{{$customer->name}}"},
+                    @endforeach
+                ],
+                status : [
+                    {name:"激活",value:"激活"},
+                    {name:"冻结",value:"冻结"},
+                ],
                 checkData : [],
+                sum : Number("{{ $reports->total() }}"),
             },
             mounted(){
                 let data=[
                     [
-                        {name:'workgroup',type:'select',tip:'项目小组',placeholder: '项目小组',data:this.workgroup},
+                        {name:'owner_group_id',type:'select',tip:'项目小组',placeholder: '项目小组',data:this.workgroup},
                         {name:'counting_month_start',type:'dateMonth',tip:'起始结算月'},
                         {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的项目'],
                             placeholder:['项目','定位或多选项目'],data:this.owners},
@@ -103,22 +158,44 @@
                     header.init();
                 },0);
             },
+            watch:{
+                checkData:{
+                    handler(){
+                        if (this.checkData.length === this.reports.length){
+                            document.querySelector('#all').checked = true;
+                            document.querySelector('#all_temp').checked = true;
+                        }else {
+                            document.querySelector('#all').checked = false;
+                            document.querySelector('#all_temp').checked = false;
+                        }
+                    },
+                    deep:true
+                }
+            },
             methods : {
                 reportExport(isAll){
-
+                    let url = '{{url('customer/project/report/export')}}';
+                    let token='{{ csrf_token() }}';
+                    //excelExport 定义在 js/queryForm/export.js
+                    excelExport(isAll,this.checkData,url,this.sum,token);
                 },
                 //全选事件
                 checkAll(e){
                     if (e.target.checked){
+                        this.checkData = [];
                         this.reports.forEach((el)=>{
-                            if (this.checkData.indexOf(el.id) === '-1'){
-                                this.checkData.push(el.id);
-                            }
+                            this.checkData.push(el.id);
                         });
                     }else {
                         this.checkData = [];
                     }
                 },
+                _formatDate(str){
+                    return new Date(Date.parse(str.replace(/-/g,"/")));
+                },
+                _diffDate(startDate, endDate){
+
+                }
             }
         });
     </script>

+ 1 - 1
resources/views/process/index.blade.php

@@ -290,7 +290,7 @@
                                 <span v-if="processesContent.sign_commodity_barcode_mark">@{{ processesContent.sign_commodity_barcode_mark }}</span>
                             </td>
                             <td :title="processesContent.sign_commodity_name_mark?processesContent.sign_commodity_name_mark:processesContent.commodity_name" class="text-muted tooltipTarget" :class="processesContent.type=='原料单'?'td-warm':'td-cool'">
-                                <div style="width: 180px;overflow:hidden" :class="processesContent.bill_type=='原料单'?'td-warm':'td-cool'">@{{ processesContent.sign_commodity_name_mark?processesContent.sign_commodity_name_mark:processesContent.commodity_name }}</div></td>
+                                <div style="width: 180px;white-space: normal" :class="processesContent.bill_type=='原料单'?'td-warm':'td-cool'">@{{ processesContent.sign_commodity_name_mark?processesContent.sign_commodity_name_mark:processesContent.commodity_name }}</div></td>
                         </tr>
                         <tr v-if="processUnfold[processOne.code+processOne.id]">
                            <td colspan="5">

+ 4 - 0
routes/web.php

@@ -492,6 +492,10 @@ Route::group(['prefix'=>'order'],function(){
 Route::group(['prefix'=>'customer'],function(){
     /** 项目 */
     Route::group(['prefix'=>'project'],function(){
+        Route::group(['prefix'=>'report'],function(){
+            Route::match(['GET','POST'],'export','CustomerController@projectReportExport');
+        });
+
         Route::get('report','CustomerController@projectReport');
         Route::get('index','CustomerController@projectIndex');
         Route::get('create','CustomerController@projectCreate');

+ 17 - 0
tests/Unit/Customer/CustomerTest.php

@@ -0,0 +1,17 @@
+<?php
+
+namespace Tests\Unit\Customer;
+
+use PHPUnit\Framework\TestCase;
+
+class CustomerTest extends TestCase
+{
+    /**
+     * web访问
+     *
+     * @return void
+     */
+    public function testProjectReportIndex(){
+
+    }
+}