|
|
@@ -0,0 +1,206 @@
|
|
|
+@extends('layouts.app')
|
|
|
+@section('title')KPI-日报表@endsection
|
|
|
+@section('content')
|
|
|
+<div class="d-none" id="list">
|
|
|
+ <div class="container-fluid">
|
|
|
+ <div id="form_div"></div>
|
|
|
+ <!-- 导出-->
|
|
|
+ <span class="dropdown"></span>
|
|
|
+ {{-- <h3>2021</h3>--}}
|
|
|
+ <!-- 表格-->
|
|
|
+ <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><input class="checkItem" type="checkbox" :value="item.id"></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.departmentName }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.statTime.slice(0,10) }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.b2bck }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.jyck }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.qtck }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.jitck }}</span></td>
|
|
|
+
|
|
|
+
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.hhck }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.ptck }}</span></td>
|
|
|
+
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.f4ck }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.f21ck }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.f11ck }}</span></td>
|
|
|
+
|
|
|
+
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.f1ck }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.xnck }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.bfck }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.dbck }}</span></td>
|
|
|
+
|
|
|
+
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.cgth }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.xsck }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.cgrk }}</span></td>
|
|
|
+
|
|
|
+
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.thrk }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.dbrk }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.xnrk }}</span></td>
|
|
|
+
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.f31rk }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.f10rk }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.f21rk }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.f32rk }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.hhrk }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.cskc }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.qtrk }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span>@{{ item.b2brk }}</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>
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+@endsection
|
|
|
+
|
|
|
+@section('lastScript')
|
|
|
+<script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
|
|
|
+<script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
|
|
|
+<script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版2--}}
|
|
|
+<script>
|
|
|
+ let vue = new Vue({
|
|
|
+ el: "#list",
|
|
|
+ data: {
|
|
|
+ selectTr: '',
|
|
|
+ details: {
|
|
|
+ data: [],
|
|
|
+ total: null,
|
|
|
+ current: null,
|
|
|
+ pages: null,
|
|
|
+ size: null
|
|
|
+ },
|
|
|
+ size: 10,
|
|
|
+ current: 1
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ let url = this.getBaseUrl();
|
|
|
+ url += `/api/deliver/getDayDetailPage?size=${this.size}¤t=${this.current}`;
|
|
|
+ axios.get(url).then(res => {
|
|
|
+ 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;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ mounted: function () {
|
|
|
+ $('#list').removeClass('d-none');
|
|
|
+ let data = [
|
|
|
+ [
|
|
|
+ {name: 'date_start', type: 'time', tip: '选择显示指定日期的起始时间'},
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ this.form = new query({
|
|
|
+ el: "#form_div",
|
|
|
+ condition: data,
|
|
|
+ });
|
|
|
+ this.form.init();
|
|
|
+ this.rendingHeader();
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ cal_deliver_percentage(item) {
|
|
|
+ if (item.workTimes == 0) return 0;
|
|
|
+ return Math.round(item.totalDeliveryQty / item.workTimes * 100);
|
|
|
+ },
|
|
|
+
|
|
|
+ //根据环境获取不同的url
|
|
|
+ getBaseUrl() {
|
|
|
+ let url = '';
|
|
|
+ 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 env = "{{ config('env') }}";
|
|
|
+ console.log(env);
|
|
|
+ let url = this.getBaseUrl();
|
|
|
+
|
|
|
+ url += `/api/deliver/getDayDetailPage?size=${this.size}¤t=${this.current}`;
|
|
|
+ axios.get(url).then(res => {
|
|
|
+ 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;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ rendingHeader() {
|
|
|
+ let column = [
|
|
|
+ {name: 'departmentName', value: '工作组', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'statTime', value: '统计日期', neglect: true, class: "td-cool"},
|
|
|
+
|
|
|
+ {name: 'b2bck', value: 'B2B出库', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'jyck', value: '一般交易出库', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'qtck', value: '其他出库', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'jitck', value: '唯品出库', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'hhck', value: '换货出库', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'ptck', value: '普通出库', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'f4ck', value: '笕尚移仓出库单', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'f21ck', value: '笕尚调整出库单', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'f11ck', value: '笕尚退仓出库单', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'f1ck', value: '笕尚配货出库单', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'xnck', value: '虚拟出库', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'bfck', value: '补发出库', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'dbck', value: '调拨出库', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'cgth', value: '采购退货', neglect: true, class: "td-cool"},
|
|
|
+ {name: 'xsck', value: '销售出库', neglect: true, class: "td-cool"},
|
|
|
+
|
|
|
+
|
|
|
+ {name: 'cgrk', value: '采购入库', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'thrk', value: '退货入库', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'dbrk', value: '调拨入库', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'xnrk', value: '虚拟入库', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'f31rk', value: '笕尚退货入库单', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'f10rk', value: '笕尚进仓入库单', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'f21rk', value: '笕尚调整入库单', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'f32rk', value: '笕尚移仓入库单', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'hhrk', value: '换货入库', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'cskc', value: '初始化库存', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'qtrk', value: '其他入库', neglect: true, class: "td-warm"},
|
|
|
+ {name: 'b2brk', value: 'B2B入库', neglect: true, class: "td-warm"},
|
|
|
+
|
|
|
+ ];
|
|
|
+ new Header({
|
|
|
+ el: "table",
|
|
|
+ name: "details",
|
|
|
+ column: column,
|
|
|
+ data: this.details.data,
|
|
|
+ restorationColumn: 'id',
|
|
|
+ fixedTop: ($('#form_div').height()) + ($('#btn').height()) + 2,
|
|
|
+ before: [
|
|
|
+ {colspan: '18', value: '出库', class: "table-header-layer-1"},
|
|
|
+
|
|
|
+ {colspan: '12', value: '入库', class: "table-header-layer-1"},
|
|
|
+ ],
|
|
|
+ }).init();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ });
|
|
|
+</script>
|
|
|
+@endsection
|