yuang 4 лет назад
Родитель
Сommit
2e6e66602c
1 измененных файлов с 17 добавлено и 65 удалено
  1. 17 65
      resources/views/personnel/scanInfo/index.blade.php

+ 17 - 65
resources/views/personnel/scanInfo/index.blade.php

@@ -25,11 +25,11 @@
                 </select>
             </div>
             <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="起始日期">
-                <input v-model="search.startTime" class="form-control" type="datetime-local" step="01">
+                <input v-model="search.startTime" class="form-control" type="date">
             </div>
 
             <div class="form-group m-2" data-toggle="tooltip" data-placement="top" title="截止日期">
-                <input v-model="search.endTime" class="form-control" type="datetime-local" step="01">
+                <input v-model="search.endTime" class="form-control" type="date">
             </div>
 
             <div class="form-group m-2">
@@ -49,15 +49,8 @@
             <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.username }}</span></td>
-                <td class="td-warm text-muted"><span>@{{ item.empno }}</span></td>
-                <td class="td-warm text-muted"><span>打包员</span></td>
                 <td class="td-warm text-muted"><span>@{{ item.count }}</span></td>
                 <td class="td-warm text-muted"><span>@{{ item.commodityNum }}</span></td>
-                <td class="td-warm text-muted"><span>0</span></td>
-                <td class="td-warm text-muted"><span>0</span></td>
-                <td class="td-warm text-muted"><span>0</span></td>
-                <td class="td-warm text-muted"><span>0</span></td>
-
             </tr>
         </table>
         <nav aria-label="...">
@@ -99,27 +92,6 @@
                 }
             },
             created() {
-                Date.prototype.format = function(fmt) {
-                    var o = {
-                        "M+": this.getMonth() + 1, //月份
-                        "d+": this.getDate(), //日
-                        "h+": this.getHours(), //小时
-                        "m+": this.getMinutes(), //分
-                        "s+": this.getSeconds(), //秒
-                        "q+": Math.floor((this.getMonth() + 3) / 3), //季度
-                        "S": this.getMilliseconds() //毫秒
-                    };
-                    if (/(y+)/.test(fmt)) {
-                        fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
-                    }
-                    for (var k in o) {
-                        if (new RegExp("(" + k + ")").test(fmt)) {
-                            fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
-                        }
-                    }
-                    return fmt;
-                }
-
                 this.initData();
                 let url = this.getBaseUrl();
                 url += `/api/device/group/listPage?size=${this.size}&current=${this.current}`;
@@ -133,7 +105,19 @@
             },
             mounted: function () {
                 $('#list').removeClass('d-none');
-                this.rendingHeader();
+                let column = [
+                    {name: 'username', value: '用户'},
+                    {name: 'count', value: '快递数量'},
+                    {name: 'commodity_num', value: '商品数量'},
+                ];
+                new Header({
+                    el: "table",
+                    name: "details",
+                    column: column,
+                    data: this.details.data,
+                    restorationColumn: 'addtime',
+                    fixedTop: ($('#form_div').height()) + ($('#btn').height()) + 1,
+                }).init();
             },
             methods: {
                 resetSearch() {
@@ -172,12 +156,11 @@
 
                     url += `/api/device/group/listPage?size=${this.size}&current=${this.current}`;
                     let search = Object.assign({}, this.search)
-
                     if (search.startTime != null && search.startTime !== '') {
-                        search.startTime = new Date(Date.parse(search.startTime)).format("yyyy-MM-dd hh:mm:ss");
+                        search.startTime += " 00:00:00";
                     }
                     if (search.endTime != null && search.endTime !== '') {
-                        search.endTime =new Date(Date.parse(search.endTime)).format("yyyy-MM-dd hh:mm:ss");
+                        search.endTime += " 23:59:59";
                     }
                     axios.post(url, search).then(res => {
                         if (res.data.data === undefined) {
@@ -212,37 +195,6 @@
                         }, 50);
                     });
                 },
-
-                rendingHeader() {
-                    let column = [
-                        {name: 'name', value: '姓名', neglect: true, class: "td-cool"},
-
-                        {name: 'work_code', value: '工号', neglect: true, class: "td-warm"},
-                        {name: 'work_type', value: '岗位', neglect: true, class: "td-warm"},
-                        {name: 'package_order_num', value: '订单数', neglect: true, class: "td-warm"},
-                        {name: 'package_commodity_num', value: '单品数', neglect: true, class: "td-warm"},
-                        {name: 'invoice_order_num', value: '订单数', neglect: true, class: "td-warm"},
-                        {name: 'invoice_commodity_num', value: '单品数', neglect: true, class: "td-warm"},
-                        {name: 'scan_order_num', value: '订单数', neglect: true, class: "td-warm"},
-                        {name: 'scan_commodity_num', value: '单品数', 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: '4', value: '员工信息', class: "table-header-layer-1"},
-                            {colspan: '2', value: '打包业绩', class: "table-header-layer-1"},
-                            {colspan: '2', value: '配货业绩', class: "table-header-layer-1"},
-                            {colspan: '2', value: '扫描业绩', class: "table-header-layer-1"},
-                        ],
-                    }).init();
-                },
             },
         });
     </script>