yuang пре 4 година
родитељ
комит
ab1f6ee4eb

+ 22 - 0
app/Http/Controllers/ContainerManageController.php

@@ -0,0 +1,22 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\Warehouse;
+
+class ContainerManageController extends Controller
+{
+    public function index()
+    {
+        $warehouses = Warehouse::query()->get();
+        return view("maintenance.containerManage.index",compact('warehouses'));
+    }
+
+    public function create()
+    {
+        $userId = auth()->id();
+        $warehouses = Warehouse::query()->get();
+        return view("maintenance.containerManage.create",compact('warehouses','userId'));
+
+    }
+}

+ 39 - 0
app/Http/Controllers/ReceivingDashboardController.php

@@ -0,0 +1,39 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\Services\UserService;
+use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Http\Request;
+
+class ReceivingDashboardController extends Controller
+{
+
+    //收货表单
+    public function receivingTableList(Request $request)
+    {
+        $owners = $this->getOwners();
+        return view('store.receivingDashboard.receivingTableList.index', compact('owners'));
+    }
+
+    //时效进度
+    public function punctualityProgress(Request $request)
+    {
+        $owners = $this->getOwners();
+        return view('store.receivingDashboard.punctualityProgress.index', compact('owners'));
+    }
+
+
+    /**
+     * @return Builder[]|Collection
+     */
+    public function getOwners()
+    {
+        /** @var UserService $userService */
+        $userService = app('UserService');
+        $ownerIds = $userService->getPermittingOwnerIds(auth()->user());
+        $owners = \App\Owner::query()->select(['id', 'name', 'code'])->whereIn('id', $ownerIds)->get();
+        return $owners;
+    }
+}

+ 124 - 0
resources/views/maintenance/containerManage/create.blade.php

@@ -0,0 +1,124 @@
+@extends('layouts.app')
+@section('title')录入-容器@endsection
+
+@section('content')
+    <div class="container-fluid" id="list">
+        <div class="card col-md-8 offset-md-2">
+            <div class="card-body">
+                <div class="form-group">
+                    <div class="form-group">
+                        <label for="type">容器类型</label>
+                        <select class="form-control" id="type" v-model="submitData.type" required>
+                            <option>托盘</option>
+                            <option>周转箱</option>
+                        </select>
+                    </div>
+                </div>
+
+                <div class="form-group">
+                    <div class="form-group">
+                        <label for="warehouse">所用仓库</label>
+                        <select class="form-control" id="warehouse" v-model="submitData.warehouseId" required>
+                            <option v-for="(item,i) in  selectData.warehouses" :value="item.id"> @{{ item.name }}
+                            </option>
+                        </select>
+                    </div>
+                </div>
+
+                <div class="form-group">
+                    <div class="form-group">
+                        <label for="allowMixed">是否允许混放</label>
+                        <select class="form-control" id="allowMixed" v-model="submitData.allowMixed" required>
+                            <option>允许</option>
+                            <option>不允许</option>
+                        </select>
+                    </div>
+                </div>
+
+                <div class="form-group">
+                    <label for="volume">容积</label>
+                    <input type="number" class="form-control" id="volume" aria-describedby="volume"
+                           v-model="submitData.volume" required>
+                </div>
+
+                <div class="form-group">
+                    <label for="loadWeight">载重</label>
+                    <input type="number" class="form-control" id="loadWeight" aria-describedby="loadWeight"
+                           v-model="submitData.loadWeight" required>
+                </div>
+
+                <div class="form-group">
+                    <label for="createAmount">生成数量</label>
+                    <input type="number" class="form-control" id="createAmount" aria-describedby="createAmount"
+                           v-model="submitData.createAmount" required>
+                </div>
+                <button @click="submit()" class="btn btn-primary">提交</button>
+            </div>
+        </div>
+    </div>
+@endsection
+@section('lastScript')
+    <script>
+        let vue = new Vue({
+            el: "#list",
+            data: {
+                submitData: {
+                    type: null,
+                    warehouseId: null,
+                    allowMixed: null,
+                    volume: null,
+                    loadWeight: null,
+                    createAmount: null,
+                    userId: {!! $userId !!}
+                },
+                selectData: {
+                    warehouses: {!! $warehouses !!}
+                }
+            },
+            created() {
+            },
+            mounted: function () {
+
+            },
+            methods: {
+                submit() {
+                    let url = this.getBaseUrl() + `/api/wms/containerManage/create`;
+                    axios.post(url, this.submitData).then(res => {
+                        if (res.data.code !== 200) {
+                            let errors = "";
+                            for (let i in res.data.data) {
+                                errors += i + ': ' + res.data.data[i];
+                            }
+                            tempTip.show(errors);
+
+                        } else {
+                            tempTip.showSuccess('提交成功!');
+                            this.submitData = {
+                                type: null,
+                                warehouseId: null,
+                                allowMixed: null,
+                                volume: null,
+                                loadWeight: null,
+                                createAmount: null,
+                                userId: {!! $userId !!}
+                            }
+                        }
+                    });
+                },
+
+                //根据环境获取不同的url
+                getBaseUrl() {
+                    let url = null;
+                    let env = "{{ config('app.env') }}";
+                    if (env === 'local') {
+                        url = 'http://127.0.0.1:8118'
+                    } else if (env === 'production') {
+                        url = 'https://swms.baoshi56.com'
+                    }
+                    return url;
+                },
+            },
+
+        });
+    </script>
+@endsection

+ 265 - 0
resources/views/maintenance/containerManage/index.blade.php

@@ -0,0 +1,265 @@
+@extends('layouts.app')
+@section('title')容器管理@endsection
+@section('content')
+    <div class="d-none" id="list">
+        <!--查询            -->
+        <div class="row m-3" style="background-color: #fff;">
+            <div class="form-group ml-4 mt-3" data-toggle="tooltip" data-placement="top" title="选择全部">
+                <input @change="checkAllBtn()" v-model="checkAll" type="checkbox" class="form-check-input"
+                       id="checkAll">
+                <label class="form-check-label" for="checkAll">选择全部</label>
+            </div>
+            <div class="form-group m-2">
+                <select class="form-control selectpicker" title="分页大小" v-model="size">
+                    <option value="50">50</option>
+                    <option value="100">100</option>
+                    <option value="200">200</option>
+                    <option value="500">500</option>
+                    <option value="1000">1000</option>
+                </select>
+            </div>
+            <div class="form-group m-2" style="max-width: 200px !important;">
+                <select v-model="search.warehouseId" class="selectpicker form-control"  title="仓库"
+                        data-actions-box="true"
+                        data-live-search="true"
+                        data-live-search-placeholder="搜索"
+                >
+                    <option v-for="(v,k) of selectData.warehouses" :value="v.id" :key="v.id">@{{ v.name }}</option>
+                </select>
+            </div>
+            <div class="form-group m-2">
+                <select class="form-control selectpicker" title="类型" v-model="search.type">
+                    <option value="托盘">托盘</option>
+                    <option value="周转箱">周转箱</option>
+                </select>
+            </div>
+
+            <div class="form-group m-2">
+                <select class="form-control selectpicker" title="是否允许混放" v-model="search.allowMixed">
+                    <option value="允许">允许</option>
+                    <option value="不允许">不允许</option>
+                </select>
+            </div>
+            <div class="form-group m-2">
+                <button class="form-control btn btn-sm btn-info" @click="searchData()">查询</button>
+            </div>
+            <td class="form-group m-2">
+                <div class="btn-group mt-2" role="group">
+                    <button id="btnGroupDrop1" type="button" class="form-control btn btn-sm btn-info dropdown-toggle"
+                            data-toggle="dropdown">
+                        批量操作
+                    </button>
+                    <div class="dropdown-menu m-2" aria-labelledby="btnGroupDrop1">
+                        <button type="button" class="btn btn-danger" @click="switchContainerStatusBench('停用')">停用
+                        </button>
+                        <button type="button" class="btn btn-success" @click="switchContainerStatusBench('启用')">启用
+                        </button>
+                    </div>
+                </div>
+
+            </td>
+        </div>
+
+        <!--            导出-->
+        <span class="dropdown"></span>
+        <!--            表格-->
+        <table class="table table-striped table-bordered table-hover card-body td-min-width-80" id="table">
+            <tr v-for="(item,i) in details.data" @click="selectTr===i+1?selectTr=0:selectTr=i+1"
+                :class="selectTr===i+1?'focusing' : ''">
+                <td>
+                    <input class="checkItem" type="checkbox" v-model="item.checked">
+                </td>
+                <td class="td-warm text-muted"><span>@{{ i+1 }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.containerNo }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.type }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.warehouseCode }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.allowMixed }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.volume }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.loadWeight }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.username }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.status }}</span></td>
+                <td class="td-warm text-muted"><span>
+                        <button v-if="item.status == '启用'" @click="switchContainerStatus(item,'停用')" type="button"
+                                class="btn btn-danger">停用</button>
+                        <button v-if="item.status == '停用'" @click="switchContainerStatus(item,'启用')" type="button"
+                                class="btn btn-success">启用</button>
+                    </span>
+                </td>
+            </tr>
+        </table>
+
+        <nav aria-label="...">
+            <ul class="pagination">
+                <li class="page-item" :class="current===1?'disabled':''">
+                    <button class="page-link" @click="pagination('pre')">上一页</button>
+                </li>
+                <li class="page-item" :class="current===details.pages?'disabled':''">
+                    <button class="page-link" @click="pagination('next')">下一页</button>
+                </li>
+            </ul>
+        </nav>
+    </div>
+
+
+@endsection
+
+@section('lastScript')
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版2--}}
+    <script>
+        let vue = new Vue({
+            el: "#list",
+            data: {
+                submitData: {
+                    type: null,
+                    warehouseId: null,
+                    allowMixed: null,
+                    volume: null,
+                    loadWeight: null,
+                    createAmount: null,
+                },
+                selectData: {
+                    warehouses: {!! $warehouses !!}
+                },
+                checkAll: false,
+                selectTr: 0,
+                details: {
+                    data: [],
+                    total: null,
+                    current: 1,
+                    pages: null,
+                    size: 50,
+                },
+                search: {
+                    type: null,
+                    warehouseId: null,
+                    allowMixed: null,
+                },
+                size: 50,
+                current: 1,
+            },
+            created() {
+                let url = this.getBaseUrl() + `/api/wms/containerManage/list?size=${this.size}&current=${this.current}`;
+                this.getPageResult(url);
+            },
+            mounted: function () {
+                $('#list').removeClass('d-none');
+                $(".up").slideUp();
+                let column = [
+                    {name: 'id', value: '序号'},
+                    {name: 'containerNo', value: '容器号'},
+                    {name: 'type', value: '容器类型'},
+                    {name: 'warehouseCode', value: '所在仓库'},
+                    {name: 'allowMixed', value: '是否允许混放'},
+                    {name: 'volume', value: '容积'},
+                    {name: 'loadWeight', value: '载重'},
+                    {name: 'username', value: '创建人'},
+                    {name: 'status', value: '状态'},
+                    {name: 'action', value: '操作'},
+
+                ];
+                new Header({
+                    el: "table",
+                    name: "details",
+                    column: column,
+                    data: this.details.data,
+                    restorationColumn: 'addtime',
+                    fixedTop: ($('#form_div').height()) + ($('#btn').height()) + 1,
+                }).init();
+            },
+            methods: {
+                checkAllBtn() {
+                    for (let item of this.details.data) {
+                        item.checked = this.checkAll;
+                    }
+                },
+                getPageResult(url) {
+                    tempTip.showSuccess('开始查询,请稍后!');
+                    axios.post(url, this.getSearch()).then(res => {
+                        tempTip.showSuccess('查询成功!');
+                        if (res.data.code !== 200) {
+                            tempTip.show('接口异常!');
+                            this.details.data = [];
+                            this.details.total = 0
+                            this.details.current = 1
+                            this.details.pages = 0
+                            this.details.size = 50;
+                        } else {
+                            this.details.data = res.data.data.list;
+                            this.details.total = res.data.data.page.total;
+                            this.details.current = res.data.data.page.pageNum;
+                            this.details.pages = res.data.data.page.pages
+                            this.details.size = res.data.data.page.pageSize;
+                        }
+                    });
+                },
+                getSearch() {
+                    return Object.assign({}, this.search);
+                },
+                searchData() {
+                    this.current = 1;
+                    this.pagination();
+                },
+                //根据环境获取不同的url
+                getBaseUrl() {
+                    let url = null;
+                    let env = "{{ config('app.env') }}";
+                    if (env === 'local') {
+                        url = 'http://127.0.0.1:8118'
+                    } else if (env === 'production') {
+                        url = 'https://swms.baoshi56.com'
+                    }
+                    return url;
+                },
+                pagination(flag) {
+                    if (flag === 'pre' && this.current > 1) {
+                        this.current--;
+                    } else if (flag === 'next' && this.current < this.details.pages) {
+                        this.current++;
+                    }
+                    let url = this.getBaseUrl() + `/api/wms/containerManage/list?size=${this.size}&current=${this.current}`;
+                    this.getPageResult(url);
+
+                },
+                switchContainerStatus(item, status) {
+                    let url = this.getBaseUrl() + `/api/wms/containerManage/update`;
+                    axios.patch(url, {
+                        id: item.id,
+                        status
+                    }).then(res => {
+                        tempTip.showSuccess('修改状态成功!');
+                        item.status = status;
+                    })
+                },
+                switchContainerStatusBench(status) {
+                    let url = this.getBaseUrl() + `/api/wms/containerManage/benchSwitchStatus`;
+                    let filter = this.details.data.filter(i => i.checked === true);
+                    if (filter.length === 0) {
+                        tempTip.show("选中的元素为空");
+                        return;
+                    }
+                    let idList = filter.map(i => i.id);
+
+                    axios.patch(url, {
+                        idList,
+                        status
+                    }).then(res => {
+                        if (res.data.code !== 200) {
+                            let errors = "";
+                            for (let i in res.data.data) {
+                                errors += i + ': ' + res.data.data[i];
+                            }
+                            tempTip.show(errors);
+
+                        } else {
+                            tempTip.showSuccess('批量修改状态成功!');
+                            for (let item of filter) {
+                                item.status = status;
+                            }
+                        }
+                    });
+                }
+            },
+
+        });
+    </script>
+@endsection

+ 214 - 0
resources/views/store/receivingDashboard/punctualityProgress/index.blade.php

@@ -0,0 +1,214 @@
+@extends('layouts.app')
+@section('title')时效进度@endsection
+@section('content')
+    <div class="d-none" id="list">
+        <!--查询            -->
+        <div class="row m-3" style="background-color: #fff;">
+            <div class="form-group m-2">
+                <select class="form-control selectpicker" title="分页大小" v-model="size">
+                    <option value="50">50</option>
+                    <option value="100">100</option>
+                    <option value="200">200</option>
+                    <option value="500">500</option>
+                    <option value="1000">1000</option>
+                </select>
+            </div>
+            <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="货主">
+                <input v-model="search.customerName" class="form-control" type="text" step="01" placeholder="货主">
+            </div>
+            <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="起始日期">
+                <input v-model="search.startTime" class="form-control" type="date" step="01">
+            </div>
+            <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="截止日期">
+                <input v-model="search.endTime" class="form-control" type="date" step="01">
+            </div>
+            <div class="form-group m-2">
+                <button class="form-control btn btn-sm btn-info" @click="searchData()">查询</button>
+            </div>
+
+            <div class="form-group m-2">
+                <button class="form-control btn btn-sm btn-success" @click="downExcel()">导出EXCEL</button>
+            </div>
+        </div>
+
+        <!--            导出-->
+        <span class="dropdown"></span>
+        <!--            表格-->
+        <table class="table table-striped table-bordered table-hover text-nowrap waybill-table td-min-width-80"
+               style="background: #fff;" id="table">
+            <tr v-for="(item,i) in details.data" :key="i">
+                <td class="td-warm text-muted"><span>@{{ i+1 }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.ownerName }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.erpOrderNo }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.logisticNumber }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.province }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.warehouseCode }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.payTime }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.issueTime }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.checkTime }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.logisticBranch }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.pickupTime }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.transferTime }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.receiveTime }}</span></td>
+            </tr>
+        </table>
+
+        <nav aria-label="...">
+            <ul class="pagination">
+                <li class="page-item" :class="current===1?'disabled':''">
+                    <button class="page-link" @click="pagination('pre')">上一页</button>
+                </li>
+                <li class="page-item" :class="current===details.pages?'disabled':''">
+                    <button class="page-link" @click="pagination('next')">下一页</button>
+                </li>
+            </ul>
+        </nav>
+    </div>
+
+
+@endsection
+
+@section('lastScript')
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版2--}}
+    <script>
+        let vue = new Vue({
+            el: "#list",
+            data: {
+                selectTr: null,
+                details: {
+                    data: [],
+                    total: null,
+                    current: 1,
+                    pages: null,
+                    size: 50,
+                },
+                search: {
+                    startTime: null,
+                    endTime: null,
+                    customerName: null,
+                    ownerIdList: {!! $ownerIds !!}
+                },
+                size: 50,
+                current: 1,
+            },
+            created() {
+                let url = this.getBaseUrl() + `/api/report/orderOperationLog/list?size=${this.size}&current=${this.current}`
+                this.initSearchDate();
+                this.getPageResult(url);
+            },
+            mounted: function () {
+                $('#list').removeClass('d-none');
+                //ASN号	预约号	容器号	商品名称	SKU	条码	收货数量	收货任务生成时间	收货任务完结时间	上架时间
+
+                let column = [
+                    {name: 'ownerName', value: 'ASN号'},
+                    {name: 'erpOrderNo', value: '预约号'},
+                    {name: 'logisticNumber', value: '容器号'},
+                    {name: 'province', value: '商品名称'},
+                    {name: 'warehouseCode', value: 'SKU'},
+                    {name: 'payTime', value: '条码'},
+                    {name: 'issueTime', value: '收货数量'},
+                    {name: 'checkTime', value: '收货任务生成时间'},
+                    {name: 'logisticBranch', value: ' 收货任务完结时间'},
+                    {name: 'pickupTime', value: '上架时间'},
+                ];
+                new Header({
+                    el: "table",
+                    name: "details",
+                    column: column,
+                    data: this.details.data,
+                    restorationColumn: 'addtime',
+                    fixedTop: ($('#form_div').height()) + ($('#btn').height()) + 1,
+                }).init();
+            },
+            methods: {
+                getPageResult(url) {
+                    tempTip.showSuccess('开始查询,请稍后!');
+                    axios.post(url, this.getSearch()).then(res => {
+                        tempTip.showSuccess('查询成功!');
+                        if (res.data.data === undefined) {
+                            this.details.data = [];
+                            this.details.total = 0
+                            this.details.current = 1
+                            this.details.pages = 0
+                            this.details.size = 50;
+                        } else {
+                            this.details.data = res.data.data.list;
+                            this.details.total = res.data.data.page.total;
+                            this.details.current = res.data.data.page.pageNum;
+                            this.details.pages = res.data.data.page.pages
+                            this.details.size = res.data.data.page.pageSize;
+                        }
+                    });
+                },
+                getSearch() {
+                    let search = Object.assign({}, this.search);
+                    search.startTime += ' 00:00:00';
+                    search.endTime += ' 23:59:59';
+                    return search;
+                },
+                //初始化日期为今天和昨天
+                initSearchDate() {
+                    let day1 = new Date();
+                    day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000);
+                    let s1 = day1.getFullYear() + "-" + ((day1.getMonth() + 1) >= 10 ? (day1.getMonth() + 1) : ('0' + (day1.getMonth() + 1))) + "-" + (day1.getDate() >= 10 ? day1.getDate() : ('0' + day1.getDate()));
+                    //今天的时间
+                    let day2 = new Date();
+                    day2.setTime(day2.getTime());
+                    let s2 = day2.getFullYear() + "-" + ((day2.getMonth() + 1) >= 10 ? (day2.getMonth() + 1) : ('0' + (day2.getMonth() + 1))) + "-" + (day2.getDate() >= 10 ? day2.getDate() : ('0' + day2.getDate()));
+                    this.search.startTime = s1;
+                    this.search.endTime = s2;
+                },
+                searchData() {
+                    this.current = 1;
+                    this.pagination();
+                },
+                //根据环境获取不同的url
+                getBaseUrl() {
+                    let url = null;
+                    let env = "{{ config('app.env') }}";
+                    if (env === 'local') {
+                        url = 'http://127.0.0.1:8111'
+                    } else if (env === 'production') {
+                        url = 'https://stat.baoshi56.com'
+                    }
+                    return url;
+                },
+                pagination(flag) {
+                    if (flag === 'pre' && this.current > 1) {
+                        this.current--;
+                    } else if (flag === 'next' && this.current < this.details.pages) {
+                        this.current++;
+                    }
+                    let url = this.getBaseUrl() + `/api/report/orderOperationLog/list?size=${this.size}&current=${this.current}`
+                    this.getPageResult(url);
+                },
+                downExcel() {
+                    let url = this.getBaseUrl();
+                    url += '/api/report/orderOperationLog/export';
+                    let search = Object.assign({}, this.search);
+                    search.startTime += ' 00:00:00';
+                    search.endTime += ' 23:59:59';
+                    axios.post(url, search).then(res => {
+                        if (res.data.code === 200) {
+                            let filename = res.data.data;
+                            let downUrl = this.getBaseUrl() + '/api/report/orderOperationLog/export/' + filename;
+                            let link = document.createElement('a');
+                            link.style.display = 'none';
+                            link.href = downUrl;
+                            link.download = `${filename}.xlsx`;
+                            document.body.appendChild(link);
+                            link.click();
+                            document.body.removeChild(link);
+                            tempTip.showSuccess('导出成功!');
+                        } else {
+                            tempTip.setDuration(3000);
+                            tempTip.show(res.data.data);
+                        }
+                    })
+                }
+            },
+
+        });
+    </script>
+@endsection

+ 320 - 0
resources/views/store/receivingDashboard/receivingTableList/index.blade.php

@@ -0,0 +1,320 @@
+@extends('layouts.app')
+@section('title')收货表单@endsection
+@section('content')
+    <div class="d-none" id="list">
+        <!--查询            -->
+        <div class="row m-3" style="background-color: #fff;">
+            <div class="form-group m-2">
+                <select class="form-control selectpicker" title="分页大小" v-model="size">
+                    <option value="50">50</option>
+                    <option value="100">100</option>
+                    <option value="200">200</option>
+                    <option value="500">500</option>
+                    <option value="1000">1000</option>
+                </select>
+            </div>
+            <div class="form-group m-2" style="max-width: 200px !important;">
+                <select v-model="search.customerId" class="selectpicker form-control" title="选择货主"
+                        data-actions-box="true"
+                        data-live-search="true"
+                        data-live-search-placeholder="搜索"
+                >
+                    <option v-for="(v,k) of searchSelects.owners" :value="v.id" :key="v.id">@{{ v.name }}</option>
+                </select>
+            </div>
+            <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="货主">
+                <input v-model="search.receiveTaskNo" class="form-control" type="text" step="01" placeholder="收货任务号">
+            </div>
+            <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="货主">
+                <input v-model="search.reservationNo" class="form-control" type="text" step="01" placeholder="预约号">
+            </div>
+            <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="货主">
+                <select v-model="search.status" class="selectpicker form-control" title="选择状态"
+                        data-actions-box="true"
+                        data-live-search="true"
+                        data-live-search-placeholder="搜索"
+                >
+                    <option v-for="v of searchSelects.statuses" :value="v" :key="v.id">@{{ v }}</option>
+                </select>
+            </div>
+            <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="货主">
+                <input v-model="search.asnNo" class="form-control" type="text" step="01" placeholder="ASN号">
+            </div>
+            <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="起始日期">
+                <input v-model="search.createSingleStartTime" class="form-control" type="date" step="01">
+            </div>
+            <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="截止日期">
+                <input v-model="search.createSingleEndTime" class="form-control" type="date" step="01">
+            </div>
+            <div class="form-group m-2">
+                <button class="form-control btn btn-sm btn-info" @click="searchData()">查询</button>
+            </div>
+        </div>
+        <!--            表格-->
+        <table class="table table-striped table-bordered table-hover text-nowrap waybill-table td-min-width-80"
+               style="background: #fff;" id="table">
+            <tr v-for="(item,i) in resData.details.data" :key="i">
+                <td class="td-warm text-muted"><span>@{{ i+1 }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.customerName }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.receiveTaskNo }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.reservationNo }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.status }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.asnNo }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.createSingleTime }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.finishedReceiveTime }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.receivePerson }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.expectancyAmount }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.receivedAmount }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.unfinishedReceiveAmount }}</span></td>
+                <td class="td-warm text-muted"><span>@{{ item.receiveConsumeDuration }}</span></td>
+                <td class="td-warm text-muted">
+                    <button @click="showDetail(item.receiveTaskNo,item.reservationNo,item.asnNo)" type="button"
+                            class="btn btn-primary" data-toggle="modal"
+                            data-target="#staticBackdrop">
+                        查看明细
+                    </button>
+                </td>
+            </tr>
+        </table>
+
+        <nav aria-label="..+.">
+            <ul class="pagination">
+                <li class="page-item" :class="current===1?'disabled':''">
+                    <button class="page-link" @click="pagination('pre')">上一页</button>
+                </li>
+                <li class="page-item" :class="current===resData.details.pages?'disabled':''">
+                    <button class="page-link" @click="pagination('next')">下一页</button>
+                </li>
+            </ul>
+        </nav>
+
+
+        <!-- Modal -->
+        <div class="modal fade" id="staticBackdrop" tabindex="-1" aria-labelledby="staticBackdropLabel"
+             aria-hidden="true">
+            <div class="modal-dialog modal-xl">
+                <div class="modal-content modal-xl">
+                    <div class="modal-header modal-xl">
+                        <h5 class="modal-title" id="staticBackdropLabel">明细</h5>
+                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                            <span aria-hidden="true">&times;</span>
+                        </button>
+                    </div>
+                    <div class="modal-body modal-xl">
+                        <!-- Scrollable modal -->
+                        <div class="modal-dialog modal-xl modal-dialog-scrollable">
+                            <table class="table table-striped table-bordered table-hover text-nowrap waybill-table"
+                                   style="background: #fff;" id="table_inner">
+                                <tr v-for="(item,i) in resData.itemDetail" :key="i">
+                                    <td class="td-warm text-muted"><span>@{{ i+1 }}</span></td>
+                                    <td class="td-warm text-muted"><span>@{{ item.receiveTaskNo }}</span></td>
+                                    <td class="td-warm text-muted"><span>@{{ item.asnNo }}</span></td>
+                                    <td class="td-warm text-muted"><span>@{{ item.reservationNo }}</span></td>
+                                    <td class="td-warm text-muted"><span>@{{ item.descr }}</span></td>
+                                    <td class="td-warm text-muted"><span>@{{ item.sku }}</span></td>
+                                    <td class="td-warm text-muted"><span>@{{ item.expectedQty }}</span></td>
+                                    <td class="td-warm text-muted"><span>@{{ item.receivedQty }}</span></td>
+                                    <td class="td-warm text-muted"><span>@{{ item.unfinishedReceiveQty }}</span></td>
+                                </tr>
+                            </table>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+
+@endsection
+
+@section('lastScript')
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版2--}}
+    <script>
+        /**
+         * @Description: 轮询执行方法
+         * @param {func} function 需要轮询的方法
+         * @param {time} number 轮询间隔,默认1s
+         * @param {endTime} number 可轮询时间, 为空时一直轮询
+         * @param {immedaite} boolean 第一次是否立即执行
+         * @author: XuLijuan
+         */
+        const pollingFunction = (func, time = 1000, endTime, immediate = false) => {
+            immediate && func(); //是否立即执行一次,由实际决定
+            const startTime = new Date().getTime();
+            const pollTimer = setInterval(() => {
+                const nowTime = new Date().getTime();
+                if (endTime && nowTime - startTime >= endTime) {
+                    pollTimer && clearInterval(pollTimer);
+                }
+                func();
+            }, time);
+            return pollTimer;
+        };
+        let vue = new Vue({
+            el: "#list",
+            data: {
+                timer: null,
+                resData: {
+                    details: {
+                        data: [],
+                        total: null,
+                        current: 1,
+                        pages: null,
+                        size: 50,
+                    },
+                    itemDetail: null,
+                },
+                searchSelects: {
+                    owners: {!! $owners !!},
+                    statuses: ['创建', '进行中', '完成', '超时完成'],
+                },
+                selectTr: null,
+                search: {
+                    customerId: null,
+                    receiveTaskNo: null,
+                    reservationNo: null,
+                    status: null,
+                    asnNo: null,
+                    createSingleStartTime: null,
+                    createSingleEndTime: null,
+                    finishedReceiveTime: null,
+                    receivePerson: null,
+                },
+                size: 50,
+                current: 1,
+            },
+            created() {
+                let url = this.getBaseUrl() + `/api/receiveBoard/formList?size=${this.size}&current=${this.current}`
+                this.initSearchDate();
+                this.getPageResult(url);
+            },
+            beforeDestroy() {
+                clearInterval(this.timer)
+            },
+            mounted: function () {
+                $('#list').removeClass('d-none');
+                pollingFunction(this.searchData, 1000 * 30)
+                let column = [
+                    {name: 'customerName', value: '货主'},
+                    {name: 'receiveTaskNo', value: '收货任务号'},
+                    {name: 'reservationNo', value: '预约号'},
+                    {name: 'status', value: '状态'},
+                    {name: 'asnNo', value: 'ASN单号'},
+                    {name: 'createSingleTime', value: '开单时间'},
+                    {name: 'finishedReceiveTime', value: '完成收货时间'},
+                    {name: 'receivePerson', value: '收货员'},
+                    {name: 'expectancyAmount', value: ' 预期数'},
+                    {name: 'receivedAmount', value: '已收数'},
+                    {name: 'unfinishedReceiveAmount', value: '未收数'},
+                    {name: 'receiveConsumeDuration', value: '收货时间'},
+                    {name: 'action', value: '查看明细'},
+
+                ];
+                new Header({
+                    el: "table",
+                    name: "details",
+                    column: column,
+                    data: this.resData.details.data,
+                    restorationColumn: 'addtime',
+                    fixedTop: ($('#form_div').height()) + ($('#btn').height()) + 1,
+                }).init();
+                let column2 = [
+                    {name: 'receiveTaskNo', value: '收货任务号'},
+                    {name: 'asnNo', value: 'ASN号'},
+                    {name: 'reservationNo', value: '预约号'},
+                    {name: 'descr', value: '商品名称'},
+                    {name: 'sku', value: 'SKU'},
+                    {name: 'expectedQty', value: '预期数'},
+                    {name: 'receivedQty', value: '已收数(上架)'},
+                    {name: 'unfinishedReceiveQty', value: '未收数'},
+                ];
+                new Header({
+                    el: "table_inner",
+                    name: "details",
+                    column: column2,
+                    data: this.resData.details.data,
+                    restorationColumn: 'addtime',
+                    fixedTop: ($('#form_div').height()) + ($('#btn').height()) + 1,
+                }).init();
+            },
+            methods: {
+                getPageResult(url) {
+                    tempTip.showSuccess('开始查询,请稍后!');
+                    axios.post(url, this.getSearch()).then(res => {
+                        tempTip.showSuccess('查询成功!');
+                        if (res.data.data === undefined) {
+                            this.resData.details.data = [];
+                            this.resData.details.total = 0
+                            this.resData.details.current = 1
+                            this.resData.details.pages = 0
+                            this.resData.details.size = 50;
+                        } else {
+                            this.resData.details.data = res.data.data.list;
+                            this.resData.details.total = res.data.data.page.total;
+                            this.resData.details.current = res.data.data.page.pageNum;
+                            this.resData.details.pages = res.data.data.page.pages
+                            this.resData.details.size = res.data.data.page.pageSize;
+                        }
+                    });
+                },
+                getSearch() {
+                    let search = Object.assign({}, this.search);
+                    search.startTime += ' 00:00:00';
+                    search.endTime += ' 23:59:59';
+                    console.log(search);
+                    return search;
+                },
+                //初始化日期为今天和昨天
+                initSearchDate() {
+                    let day1 = new Date();
+                    day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000);
+                    let s1 = day1.getFullYear() + "-" + ((day1.getMonth() + 1) >= 10 ? (day1.getMonth() + 1) : ('0' + (day1.getMonth() + 1))) + "-" + (day1.getDate() >= 10 ? day1.getDate() : ('0' + day1.getDate()));
+                    //今天的时间
+                    let day2 = new Date();
+                    day2.setTime(day2.getTime());
+                    let s2 = day2.getFullYear() + "-" + ((day2.getMonth() + 1) >= 10 ? (day2.getMonth() + 1) : ('0' + (day2.getMonth() + 1))) + "-" + (day2.getDate() >= 10 ? day2.getDate() : ('0' + day2.getDate()));
+                    this.search.startTime = s1;
+                    this.search.endTime = s2;
+                },
+                searchData() {
+                    this.current = 1;
+                    this.pagination();
+                },
+                //根据环境获取不同的url
+                getBaseUrl() {
+                    let url = null;
+                    let env = "{{ config('app.env') }}";
+                    if (env === 'local') {
+                        url = 'http://127.0.0.1:8116'
+                    } else if (env === 'production') {
+                        url = 'https://device.baoshi56.com'
+                    }
+                    return url;
+                },
+                pagination(flag) {
+                    if (flag === 'pre' && this.current > 1) {
+                        this.current--;
+                    } else if (flag === 'next' && this.current < this.resData.details.pages) {
+                        this.current++;
+                    }
+                    let url = this.getBaseUrl() + `/api/receiveBoard/formList?size=${this.size}&current=${this.current}`
+                    this.getPageResult(url);
+                },
+                showDetail(receiveTaskNo, reservationNo, asnNo) {
+                    let url = this.getBaseUrl() + `/api/receiveBoard/receiveDetail?receiveTaskNo=${receiveTaskNo}&reservationNo=${reservationNo}&asnNo=${asnNo}`
+                    tempTip.showSuccess('开始查询,请稍后!');
+                    axios.get(url, this.getSearch()).then(res => {
+                        tempTip.showSuccess('查询成功!');
+                        if (res.data.data === undefined) {
+                            this.resData.itemDetail = null;
+                        } else {
+                            this.resData.itemDetail = res.data.data;
+                        }
+                    });
+                }
+
+            },
+
+        });
+    </script>
+@endsection

+ 10 - 0
routes/web.php

@@ -38,6 +38,10 @@ Route::prefix('store')->group(function(){
         Route::get("/index","ReceivingTaskController@index");
         Route::get("/create","ReceivingTaskController@create");
     });
+    Route::prefix("/receivingDashboard")->group(function (){
+        Route::get("/receivingTableList", "ReceivingDashboardController@receivingTableList");
+        Route::get("/punctualityProgress", "ReceivingDashboardController@punctualityProgress");
+    });
 });
 
 //入库预约终端
@@ -125,6 +129,12 @@ Route::group(['middleware' => 'auth'], function ($route) {
 
     /** 基础设置 */
     $route->group(['prefix' => 'maintenance'], function () {
+        //容器管理
+        Route::group(['prefix' => 'containerManage'], function () {
+            Route::get("", 'ContainerManageController@index');
+            Route::get("create", 'ContainerManageController@create');
+        });
+
         /** 料箱型号 */
         Route::get("materialBoxModel", "MaterialBoxModelController@index");
         Route::group(['prefix' => "materialBoxModel"], function () {