Ver código fonte

header.js重做

Zhouzhendong 5 anos atrás
pai
commit
18e96e3b7b
43 arquivos alterados com 779 adições e 2258 exclusões
  1. 1 1
      app/Http/Controllers/TestController.php
  2. 237 0
      resources/js/queryForm/header-temp.js
  3. 120 175
      resources/js/queryForm/header.js
  4. 5 0
      resources/sass/text.scss
  5. 9 42
      resources/views/customer/project/area.blade.php
  6. 11 57
      resources/views/customer/project/index.blade.php
  7. 11 51
      resources/views/finance/billConfirmation.blade.php
  8. 18 58
      resources/views/finance/instantBill.blade.php
  9. 13 56
      resources/views/inventory/statement/changeInventory.blade.php
  10. 12 52
      resources/views/inventory/statement/dailyLog.blade.php
  11. 11 62
      resources/views/inventory/statement/inventoryCompare.blade.php
  12. 17 59
      resources/views/inventory/stockInventory/inventoryMission.blade.php
  13. 10 53
      resources/views/inventory/stockInventory/mission.blade.php
  14. 5 9
      resources/views/maintenance/role/index.blade.php
  15. 5 16
      resources/views/maintenance/user/index.blade.php
  16. 32 70
      resources/views/order/index/delivering.blade.php
  17. 5 8
      resources/views/order/index/index.blade.php
  18. 21 44
      resources/views/order/issue/workload.blade.php
  19. 0 1
      resources/views/order/tracking/index.blade.php
  20. 0 2
      resources/views/package/logistic/index.blade.php
  21. 11 50
      resources/views/package/weigh/index.blade.php
  22. 10 49
      resources/views/package/weightExcepted/index.blade.php
  23. 12 48
      resources/views/personnel/laborReport/index.blade.php
  24. 11 50
      resources/views/personnel/report.blade.php
  25. 14 58
      resources/views/process/index.blade.php
  26. 36 59
      resources/views/process/statistic.blade.php
  27. 10 41
      resources/views/procurement/finance/checkBill.blade.php
  28. 10 42
      resources/views/procurement/finance/monthlyBillReport.blade.php
  29. 10 41
      resources/views/procurement/finance/procurementBill.blade.php
  30. 7 31
      resources/views/procurement/procurement/index.blade.php
  31. 10 55
      resources/views/rejected/search/analyze.blade.php
  32. 26 91
      resources/views/rejected/search/general.blade.php
  33. 6 19
      resources/views/store/checkingReceive/mission.blade.php
  34. 5 9
      resources/views/store/checkingReceive/show.blade.php
  35. 8 47
      resources/views/store/fast/index.blade.php
  36. 9 50
      resources/views/store/fast/storeItem.blade.php
  37. 8 46
      resources/views/store/inStorage/index.blade.php
  38. 8 49
      resources/views/store/inStorage/storeItem.blade.php
  39. 5 0
      resources/views/test.blade.php
  40. 0 509
      resources/views/test1.blade.php
  41. 8 42
      resources/views/transport/waybill/delivering.blade.php
  42. 1 1
      resources/views/transport/waybill/index.blade.php
  43. 11 55
      resources/views/transport/waybill/waybillFinancialSnapshot/index.blade.php

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

@@ -167,7 +167,7 @@ class TestController extends Controller
             ->whereNotNull("order_id")->get();
         foreach ($waybills as $waybill){
             if ($waybill->order){
-                $result = DB::selectOne(DB::raw("SELECT 1 FROM WMS_USER.DOC_ORDER_HEADER where orderno = ? and carrierid like '%DF%'"),[$waybill->order->code]);
+                $result = DB::connection("oracle")->selectOne(DB::raw("SELECT 1 FROM WMS_USER.DOC_ORDER_HEADER where orderno = ? and carrierid like '%DF%'"),[$waybill->order->code]);
                 if ($result && $waybill->is_to_pay==0)$waybill->update(["is_to_pay"=>1]);
             }
         }

+ 237 - 0
resources/js/queryForm/header-temp.js

@@ -0,0 +1,237 @@
+/**
+ * 需在页面定义三个元素 tr的元素当作当前元素 id 自定义 默认header
+ * tr的父级元素 table id默认为tr的id加Parent后缀
+ * 浮动表格元素 table id默认为tr的id加Roll后缀
+ *
+ * 21-03-04 zzd 注意:历史遗留问题在使用reset方法时column的key应为columns
+ * */
+
+window.sort=require('../utilities/sort');
+window.Header = function getHeader(object) {
+    this._header = object.el || '#header';  //基点元素
+    this._columns = object.column;   //列名
+    this._data = object.data;   //被排序数据
+    this._restorationColumn = object.restorationColumn; //恢复原数据基准字段
+    this._fixedTop = object.fixedTop || 0;  //同级浮动元素高度,使当前元素追加该元素高度浮动
+    this._offset = object.offset || 0;  //偏移量
+    this._is_restorationColumn_asc = object.is_restorationColumn_asc || false;    //恢复原数据基准字段的排序类型 true:asc false:desc
+    this._vue = object.vue || null; //vue容器
+    this._checkbox = object.checkbox || 'checkData';    //全选数据列名
+    this._closeFloat = object.closeFloat || false;  //是否开启浮动
+
+    let _this = this;
+    let _parentNode = $(_this._header);
+    let sortType = {};
+    let columnArr = [];
+    // form fixed
+    let _headerParent = $(_this._header+"Parent");
+    let _parentNodeTemp = _parentNode.clone();
+    //滚动监听
+    function fixed() {
+        let _parentNode_top = _parentNode.offset().top;
+        $(window).scroll(function(){
+            let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
+            if (scrollTop > _parentNode_top-_this._fixedTop) {
+                $(_this._header+"Roll").removeClass('d-none');
+            } else {
+                $(_this._header+"Roll").addClass('d-none');
+            }
+            let scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
+            if (scrollLeft > 0){
+                _parentNodeTemp.css('margin-left',0-(scrollLeft));
+            }else{
+                _parentNodeTemp.css('margin-left',"");
+            }
+        });
+        let resetTrWidth = function(){
+            _parentNodeTemp.css('width',($(document).width()-_parentNodeTemp.offset().left*2)+'px');
+                // _this._columns.forEach(function (column){
+                //     let protoTargetWidth = (parseInt($("#dom_" + column.name ).css('width')))-16;
+                //     let floatingColumn = $("#dom_" + column.name + "_temp");
+                //     floatingColumn.css('width', protoTargetWidth);
+                //     floatingColumn.find('span').css('width', protoTargetWidth);
+                // })
+        };
+        $(window).resize(resetTrWidth);
+        setTimeout(resetTrWidth,200)
+    }
+
+    /**
+     * column :{customization : null || bool   --是否自定义
+     *          dom : null || element           --自定义元素
+     *          style :  null || string         --样式
+     *          name : null || string           --字段名,英文
+     *          value : string                  --列名
+     *          neglect : null || bool          --是否忽略排序
+     *         }
+     * */
+    //点击事件触发的排序规则
+    function rule(column,column_sort,column_sort_temp=null) {
+        return function () {
+            if (!sortType[column.name]){
+                sortType[column.name] = 'asc';
+                columnArr.push(column.name);
+                column_sort.removeClass('fa-sort').addClass('fa-sort-asc');
+                if (column_sort_temp) column_sort_temp.removeClass('fa-sort').addClass('fa-sort-asc');
+                let columnArrTemp = [];
+                columnArrTemp.push.apply(columnArrTemp,columnArr);
+                window.sort.sort(_this._data,columnArrTemp,sortType);
+                return ;
+            }
+            if (sortType[column.name] === 'asc'){
+                sortType[column.name] = 'desc';
+                column_sort.removeClass('fa-sort-asc').addClass('fa-sort-desc');
+                if (column_sort_temp)column_sort_temp.removeClass('fa-sort-asc').addClass('fa-sort-desc');
+                let columnArrTemp = [];
+                columnArrTemp.push.apply(columnArrTemp,columnArr);
+                window.sort.sort(_this._data,columnArrTemp,sortType);
+                return ;
+            }
+            if (sortType[column.name] === 'desc'){
+                delete sortType[column.name];
+                columnArr.some(function (name, index) {
+                    if (name === column.name){
+                        columnArr.splice(index,1);
+                        return true;
+                    }
+                });
+                column_sort.removeClass('fa-sort-desc').addClass('fa-sort');
+                if (column_sort_temp)column_sort_temp.removeClass('fa-sort-desc').addClass('fa-sort');
+                if (columnArr.length === 0){
+                    //希尔排序
+                    let arr = [];
+                    arr.push.apply(arr,_this._data);
+                    let len = arr.length;
+                    for(let gap = Math.floor(len / 2); gap > 0; gap = Math.floor(gap / 2)) {
+                        for(let i = gap; i < len; i++) {
+                            let j = i;
+                            let current = arr[i];
+                            if (_this._is_restorationColumn_asc){
+                                while(j - gap >= 0 && Number(current[_this._restorationColumn]) < Number(arr[j - gap][_this._restorationColumn])) {
+                                    arr[j] = arr[j - gap];
+                                    j = j - gap;
+                                }
+                            }else{
+                                while(j - gap >= 0 && Number(current[_this._restorationColumn]) > Number(arr[j - gap][_this._restorationColumn])) {
+                                    arr[j] = arr[j - gap];
+                                    j = j - gap;
+                                }
+                            }
+                            arr[j] = current;
+                        }
+                    }
+                    _this._data.length = 0;
+                    _this._data.push.apply(_this._data,arr);
+                    return;
+                }
+                let columnArrTemp = [];
+                columnArrTemp.push.apply(columnArrTemp,columnArr);
+                window.sort.sort(_this._data,columnArrTemp,sortType);
+            }
+        }
+    }
+    //追加表头字段
+    function append() {
+        _this._columns.forEach(function (column) {
+            if (column.customization){
+                let _th = $("<th id='dom_"+column.name+"'><span style='display: inline-block'></span></th>");
+                $(_th.children()[0]).append(column.dom);
+                _parentNode.append(_th);
+            }else{
+                let _td = "<th id='dom_"+column.name+"' style='";
+                if(!column.neglect){
+                    _td += "cursor: pointer;"
+                }
+                if (column.style) _td += column.style;
+                _td += "' ";
+                if (column.class) _td += "class='"+column.class+"'";
+                _td += ">";
+                _td += "<span style='display: inline-block'>";
+                if(!column.neglect){
+                    _td += "<span id='sort_"+column.name+"' class='fa fa-sort'></span>";
+                }
+                _td += column.value+"</span>";
+                _td += "</th>";
+                _parentNode.append(_td);
+                if (!column.neglect) {
+                    let column_sort = $('#sort_' + column.name);
+                    let column_dom = $('#dom_'+column.name);
+                    column_dom.on('click',rule(column,column_sort));
+                }
+            }
+        });
+    }
+    //追加浮动表头:克隆表头元素,改变元素属性
+    function cloneDom(){
+        let height = _parentNode.height();
+        _parentNodeTemp.css('position',"fixed");
+        _parentNodeTemp.css('top',_this._fixedTop+"px");
+        _parentNodeTemp.css('z-index',"1030");
+        _parentNodeTemp.css('width',_headerParent.width()+"px");
+        _parentNodeTemp.css('background',"rgb(255, 255, 255)");
+        _parentNodeTemp.addClass('text-center');
+        _parentNodeTemp.height(height);
+        _parentNodeTemp.attr('id',_parentNode.attr('id')+"Temp");
+        $(_this._header+"Roll").append(_parentNodeTemp);
+        _this._columns.forEach(function (column) {
+            let column_dom = $('#dom_'+column.name);
+            let column_dom_temp = column_dom.clone();
+            let columnNameDom = column_dom_temp.children()[0];
+            if (column.customization){
+                if (column.type === 'checkAll'){
+                    var checkbox = $($(columnNameDom).children()[0]).children()[0];
+                    checkbox.id = checkbox.id+"_temp";
+                }
+            }
+            if (!column.neglect){
+                $(columnNameDom).children()[0].id = 'sort_'+column.name+"_temp";
+            }
+            column_dom_temp.attr('id','dom_'+column.name+"_temp");
+            $(columnNameDom).css('width',column_dom.width()+_this._offset);
+            _parentNodeTemp.append(column_dom_temp);
+            if (!column.neglect){
+                let column_sort = $('#sort_'+column.name);
+                let column_sort_temp = $('#sort_'+column.name+"_temp");
+                column_dom.off('click');
+                column_dom.on('click',rule(column,column_sort,column_sort_temp));
+                column_dom_temp.on('click',rule(column,column_sort,column_sort_temp));
+            }
+            if (column.customization){
+                if (column.type === 'checkAll'){
+                    checkAll($(checkbox),column.column);
+                }
+            }
+        });
+    }
+    //初始化
+    this.init = function() {
+        append();
+        if (_this._closeFloat)return;
+        fixed();
+        cloneDom();
+    };
+
+    this.reset = function(params = null){
+        _parentNode.empty();
+        _parentNodeTemp.empty();
+        if (params)for (let key in params)this["_"+key] = params[key];
+        this.init();
+    };
+
+    function checkAll(dom,column){
+        dom.on('click',function () {
+            if ($(this).is(":checked")== true) {
+                _this._vue[_this._checkbox].length = 0;
+                _this._data.forEach(function (object) {
+                    if (column) {
+                        object = object[column];
+                    }
+                    _this._vue[_this._checkbox].push(object);
+                });
+            } else {
+                _this._vue[_this._checkbox].length = 0;
+                _this._vue.$forceUpdate();
+            }
+        });
+    }
+};

+ 120 - 175
resources/js/queryForm/header.js

@@ -1,90 +1,135 @@
-/**
- * 需在页面定义三个元素 tr的元素当作当前元素 id 自定义 默认header
- * tr的父级元素 table id默认为tr的id加Parent后缀
- * 浮动表格元素 table id默认为tr的id加Roll后缀
- *
- * 21-03-04 zzd 注意:历史遗留问题在使用reset方法时column的key应为columns
- * */
-
+var checkData = [];
 window.sort=require('../utilities/sort');
 window.Header = function getHeader(object) {
-    this._header = object.el || '#header';  //基点元素
-    this._columns = object.column;   //列名
-    this._data = object.data;   //被排序数据
-    this._restorationColumn = object.restorationColumn; //恢复原数据基准字段
-    this._fixedTop = object.fixedTop || 0;  //同级浮动元素高度,使当前元素追加该元素高度浮动
-    this._offset = object.offset || 0;  //偏移量
-    this._is_restorationColumn_asc = object.is_restorationColumn_asc || false;    //恢复原数据基准字段的排序类型 true:asc false:desc
-    this._vue = object.vue || null; //vue容器
-    this._checkbox = object.checkbox || 'checkData';    //全选数据列名
-    this._closeFloat = object.closeFloat || false;  //是否开启浮动
+    let _targetDom = object.el ? document.getElementById(object.el) : document.getElementsByTagName("table")[0];//基点元素
+    let _columns = object.column;   //列名
+    let _fixedTop = object.fixedTop || 0;  //同级浮动元素高度,使当前元素追加该元素高度浮动
+    let _isCheckAllBox = object.isCheckAllBox || true;//是否开启全选框
+    let _data = object.data || [];   //被排序数据
+    let _restorationColumn = object.restorationColumn || 'id'; //恢复原数据基准字段
+    let _is_restorationColumn_asc = object.is_restorationColumn_asc || false;    //恢复原数据基准字段的排序类型 true:asc false:desc
+    let _before = object.before;
 
-    let _this = this;
-    let _parentNode = $(_this._header);
     let sortType = {};
     let columnArr = [];
-    // form fixed
-    let _headerParent = $(_this._header+"Parent");
-    let _parentNodeTemp = _parentNode.clone();
-    //滚动监听
-    function fixed() {
-        let _parentNode_top = _parentNode.offset().top;
-        $(window).scroll(function(){
-            let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
-            if (scrollTop > _parentNode_top-_this._fixedTop) {
-                $(_this._header+"Roll").removeClass('d-none');
-            } else {
-                $(_this._header+"Roll").addClass('d-none');
-            }
-            let scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
-            if (scrollLeft > 0){
-                _parentNodeTemp.css('margin-left',0-(scrollLeft));
-            }else{
-                _parentNodeTemp.css('margin-left',"");
+
+    let table = document.createElement("table");
+
+    function getTargetChildNode(dom) {
+        if (!dom || dom.tagName==='INPUT')return dom;
+        return getTargetChildNode(dom.firstElementChild);
+    }
+    function createHeaderBefore() {
+        let tr = document.createElement("tr");
+        _before.forEach(be=>{
+            let th = document.createElement("th");
+            if (be.colspan)th.colSpan = be.colspan;
+            if (be.font){
+                let font = document.createElement("span");
+                font.className = be.font;
+                th.appendChild(font);
             }
+            if (be.value)th.appendChild(document.createTextNode(be.value));
+            if (be.class)th.className = be.class;
+            tr.appendChild(th);
         });
-        let resetTrWidth = function(){
-            _parentNodeTemp.css('width',($(document).width()-_parentNodeTemp.offset().left*2)+'px');
-                // _this._columns.forEach(function (column){
-                //     let protoTargetWidth = (parseInt($("#dom_" + column.name ).css('width')))-16;
-                //     let floatingColumn = $("#dom_" + column.name + "_temp");
-                //     floatingColumn.css('width', protoTargetWidth);
-                //     floatingColumn.find('span').css('width', protoTargetWidth);
-                // })
-        };
-        $(window).resize(resetTrWidth);
-        setTimeout(resetTrWidth,200)
+        table.appendChild(tr);
+    }
+    function createHeader() {
+        let div = document.createElement("div");
+        div.style.position = "sticky";
+        div.style.position = "-webkit-sticky";
+        div.style.top = _fixedTop+"px";
+        div.style.backgroundColor = "white";
+        div.style.zIndex = "1030";
+        table.className = "table table-bordered mb-0 text-center";
+        let tr = document.createElement("tr");
+        let firstTr = _targetDom.getElementsByTagName("tr")[0];
+        let tds = [];
+            if (!firstTr){
+            tr.className = "text-nowrap";
+        }else tds = firstTr.children;
+        if (_isCheckAllBox){
+            let th = document.createElement("th");
+            if (firstTr) th.style.minWidth = tds[0].offsetWidth+"px";
+            let check = document.createElement("input");
+            check.type = "checkbox";
+            check.id = "checkAll";
+            let trs = _targetDom.getElementsByTagName("tr");
+            check.onchange = function () {
+                if (event.target.checked){
+                    for (let i=0;i<trs.length;i++){
+                        let checkbox = getTargetChildNode(trs[i].getElementsByTagName("td")[0]);
+                        if (!checkbox.checked){
+                            checkData.push(checkbox.value);
+                            checkbox.checked = true;
+                        }
+                    }
+                }else{
+                    checkData = [];
+                    for (let i=0;i<trs.length;i++){
+                        let checkbox = getTargetChildNode(trs[i].getElementsByTagName("td")[0]);
+                        if (checkbox.checked)checkbox.checked = false;
+                    }
+                }
+            };
+            for (let i=0;i<trs.length;i++){
+                let checkbox = getTargetChildNode(trs[i].getElementsByTagName("td")[0]);
+                if (checkbox) checkbox.onchange = function () {
+                    if (event.target.checked)checkData.push(checkbox.value);
+                    else checkData.splice(checkData.indexOf(checkbox.value),1);
+                    if (checkData.length === _data.length && !check.checked)check.checked=true;
+                    if (checkData.length !== _data.length && check.checked) check.checked=false;
+                }
+            }
+            th.appendChild(check);
+            tr.appendChild(th);
+        }
+        let i = (_isCheckAllBox && firstTr) ? 1 : 0;
+        for (i;i<(tds.length>0 ? tds.length : _columns.length);i++){
+            let th = document.createElement("th");
+            if (firstTr) th.style.minWidth = (tds[i].offsetWidth-0.3)+"px";
+            let column = _columns[_isCheckAllBox ? i-1 : i];
+            if (_columns && column){
+                if (column.style)for (let key in column.style)if (column.style.hasOwnProperty(key)) th.style[key] = column.style[key];
+                if (column.class)th.className =  column.class;
+                let span = document.createElement("span");
+                span.style.display = "inline-block";
+                if (!column.neglect){
+                    th.style.cursor = "pointer";
+                    let font = document.createElement("span");
+                    font.className = "fa fa-sort";
+                    span.appendChild(font);
+                    th.onclick = rule(column,font);
+                }
+                span.appendChild(document.createTextNode((column.value ? column.value : '')));
+                th.appendChild(span);
+            }
+            tr.appendChild(th);
+        }
+        table.appendChild(tr);
+        div.appendChild(table);
+        _targetDom.parentNode.insertBefore(div,_targetDom);
     }
 
-    /**
-     * column :{customization : null || bool   --是否自定义
-     *          dom : null || element           --自定义元素
-     *          style :  null || string         --样式
-     *          name : null || string           --字段名,英文
-     *          value : string                  --列名
-     *          neglect : null || bool          --是否忽略排序
-     *         }
-     * */
     //点击事件触发的排序规则
-    function rule(column,column_sort,column_sort_temp=null) {
+    function rule(column,columnSort) {
         return function () {
             if (!sortType[column.name]){
                 sortType[column.name] = 'asc';
                 columnArr.push(column.name);
-                column_sort.removeClass('fa-sort').addClass('fa-sort-asc');
-                if (column_sort_temp) column_sort_temp.removeClass('fa-sort').addClass('fa-sort-asc');
+                columnSort.className = "fa fa-sort-asc";
                 let columnArrTemp = [];
                 columnArrTemp.push.apply(columnArrTemp,columnArr);
-                window.sort.sort(_this._data,columnArrTemp,sortType);
+                window.sort.sort(_data,columnArrTemp,sortType);
                 return ;
             }
             if (sortType[column.name] === 'asc'){
                 sortType[column.name] = 'desc';
-                column_sort.removeClass('fa-sort-asc').addClass('fa-sort-desc');
-                if (column_sort_temp)column_sort_temp.removeClass('fa-sort-asc').addClass('fa-sort-desc');
+                columnSort.className = "fa fa-sort-desc";
                 let columnArrTemp = [];
                 columnArrTemp.push.apply(columnArrTemp,columnArr);
-                window.sort.sort(_this._data,columnArrTemp,sortType);
+                window.sort.sort(_data,columnArrTemp,sortType);
                 return ;
             }
             if (sortType[column.name] === 'desc'){
@@ -95,24 +140,23 @@ window.Header = function getHeader(object) {
                         return true;
                     }
                 });
-                column_sort.removeClass('fa-sort-desc').addClass('fa-sort');
-                if (column_sort_temp)column_sort_temp.removeClass('fa-sort-desc').addClass('fa-sort');
+                columnSort.className = "fa fa-sort";
                 if (columnArr.length === 0){
                     //希尔排序
                     let arr = [];
-                    arr.push.apply(arr,_this._data);
+                    arr.push.apply(arr,_data);
                     let len = arr.length;
                     for(let gap = Math.floor(len / 2); gap > 0; gap = Math.floor(gap / 2)) {
                         for(let i = gap; i < len; i++) {
                             let j = i;
                             let current = arr[i];
-                            if (_this._is_restorationColumn_asc){
-                                while(j - gap >= 0 && Number(current[_this._restorationColumn]) < Number(arr[j - gap][_this._restorationColumn])) {
+                            if (_is_restorationColumn_asc){
+                                while(j - gap >= 0 && Number(current[_restorationColumn]) < Number(arr[j - gap][_restorationColumn])) {
                                     arr[j] = arr[j - gap];
                                     j = j - gap;
                                 }
                             }else{
-                                while(j - gap >= 0 && Number(current[_this._restorationColumn]) > Number(arr[j - gap][_this._restorationColumn])) {
+                                while(j - gap >= 0 && Number(current[_restorationColumn]) > Number(arr[j - gap][_restorationColumn])) {
                                     arr[j] = arr[j - gap];
                                     j = j - gap;
                                 }
@@ -120,118 +164,19 @@ window.Header = function getHeader(object) {
                             arr[j] = current;
                         }
                     }
-                    _this._data.length = 0;
-                    _this._data.push.apply(_this._data,arr);
+                    _data.length = 0;
+                    _data.push.apply(_data,arr);
                     return;
                 }
                 let columnArrTemp = [];
                 columnArrTemp.push.apply(columnArrTemp,columnArr);
-                window.sort.sort(_this._data,columnArrTemp,sortType);
+                window.sort.sort(_data,columnArrTemp,sortType);
             }
         }
     }
-    //追加表头字段
-    function append() {
-        _this._columns.forEach(function (column) {
-            if (column.customization){
-                let _th = $("<th id='dom_"+column.name+"'><span style='display: inline-block'></span></th>");
-                $(_th.children()[0]).append(column.dom);
-                _parentNode.append(_th);
-            }else{
-                let _td = "<th id='dom_"+column.name+"' style='";
-                if(!column.neglect){
-                    _td += "cursor: pointer;"
-                }
-                if (column.style) _td += column.style;
-                _td += "' ";
-                if (column.class) _td += "class='"+column.class+"'";
-                _td += ">";
-                _td += "<span style='display: inline-block'>";
-                if(!column.neglect){
-                    _td += "<span id='sort_"+column.name+"' class='fa fa-sort'></span>";
-                }
-                _td += column.value+"</span>";
-                _td += "</th>";
-                _parentNode.append(_td);
-                if (!column.neglect) {
-                    let column_sort = $('#sort_' + column.name);
-                    let column_dom = $('#dom_'+column.name);
-                    column_dom.on('click',rule(column,column_sort));
-                }
-            }
-        });
-    }
-    //追加浮动表头:克隆表头元素,改变元素属性
-    function cloneDom(){
-        let height = _parentNode.height();
-        _parentNodeTemp.css('position',"fixed");
-        _parentNodeTemp.css('top',_this._fixedTop+"px");
-        _parentNodeTemp.css('z-index',"1030");
-        _parentNodeTemp.css('width',_headerParent.width()+"px");
-        _parentNodeTemp.css('background',"rgb(255, 255, 255)");
-        _parentNodeTemp.addClass('text-center');
-        _parentNodeTemp.height(height);
-        _parentNodeTemp.attr('id',_parentNode.attr('id')+"Temp");
-        $(_this._header+"Roll").append(_parentNodeTemp);
-        _this._columns.forEach(function (column) {
-            let column_dom = $('#dom_'+column.name);
-            let column_dom_temp = column_dom.clone();
-            let columnNameDom = column_dom_temp.children()[0];
-            if (column.customization){
-                if (column.type === 'checkAll'){
-                    var checkbox = $($(columnNameDom).children()[0]).children()[0];
-                    checkbox.id = checkbox.id+"_temp";
-                }
-            }
-            if (!column.neglect){
-                $(columnNameDom).children()[0].id = 'sort_'+column.name+"_temp";
-            }
-            column_dom_temp.attr('id','dom_'+column.name+"_temp");
-            $(columnNameDom).css('width',column_dom.width()+_this._offset);
-            _parentNodeTemp.append(column_dom_temp);
-            if (!column.neglect){
-                let column_sort = $('#sort_'+column.name);
-                let column_sort_temp = $('#sort_'+column.name+"_temp");
-                column_dom.off('click');
-                column_dom.on('click',rule(column,column_sort,column_sort_temp));
-                column_dom_temp.on('click',rule(column,column_sort,column_sort_temp));
-            }
-            if (column.customization){
-                if (column.type === 'checkAll'){
-                    checkAll($(checkbox),column.column);
-                }
-            }
-        });
-    }
     //初始化
     this.init = function() {
-        append();
-        if (_this._closeFloat)return;
-        fixed();
-        cloneDom();
-    };
-
-    this.reset = function(params = null){
-        _parentNode.empty();
-        _parentNodeTemp.empty();
-        if (params)for (let key in params)this["_"+key] = params[key];
-        this.init();
+        if (_before)createHeaderBefore();
+        createHeader();
     };
-
-    function checkAll(dom,column){
-        dom.on('click',function () {
-            if ($(this).is(":checked")== true) {
-                _this._vue[_this._checkbox].length = 0;
-                _this._data.forEach(function (object) {
-                    if (column) {
-                        object = object[column];
-                    }
-                    _this._vue[_this._checkbox].push(object);
-                });
-            } else {
-                _this._vue[_this._checkbox].length = 0;
-                _this._vue.$forceUpdate();
-            }
-        });
-    }
 };

+ 5 - 0
resources/sass/text.scss

@@ -220,4 +220,9 @@
     overflow-y: auto;
     border: RGB(204,204,204) solid 1px;
     border-radius: 5px
+}
+
+//规定最小宽度
+.td-min-width-80 tr td{
+    min-width: 80px;
 }

+ 9 - 42
resources/views/customer/project/area.blade.php

@@ -12,7 +12,7 @@
         <div class="d-none d-sm-block">
             <div id="form_div"></div>
             <div>
-                <button type="button" class="btn btn-outline-dark btn-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
+                <button type="button" class="btn btn-outline-dark btn-sm dropdown-toggle tooltipTarget"
                         data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                     导出Excel
                 </button>
@@ -22,15 +22,10 @@
                 </div>
                 <button class="ml-1 btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#selectedOwner">新 增</button>
             </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 table-striped table-hover table-bordered" id="headerParent">
-                {{--<tr class="text-nowrap" id="header"></tr>--}}
+            <table class="table table-sm table-striped table-hover table-bordered" id="table">
                 <tr v-for="(area,i) in areas">
                     <td>
-                        <label><input type="checkbox" :value="area.id" v-model="checkData"></label>
+                        <label><input type="checkbox" :value="area.id"></label>
                     </td>
                     <td>@{{ i+1 }}</td>
                     <td>
@@ -148,7 +143,7 @@
 
 @section('lastScript')
     <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
-    <script type="text/javascript" src="{{asset('js/test.js')}}"></script>
+    <script type="text/javascript" src="{{asset('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
     <script>
         let vue = new Vue({
@@ -190,26 +185,12 @@
                     @endforeach
                 ],
                 status : [{name:"编辑中",value:"编辑中"},{name:"已审核",value:"已审核"},{name:"已完成",value:"已完成"}],
-                checkData : [],
+
                 sum : Number("{{ $areas->total() }}"),
                 errors:[],
                 area:{},
                 index:"",
             },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.areas.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
-                }
-            },
             mounted(){
                 $(".up").slideUp();
                 $('#container').removeClass('d-none');
@@ -231,8 +212,6 @@
                 });
                 this.form.init();
                 let column = [
-
-                    {name:'index',value: '序号', neglect: true},
                     {name:'index',value: '序号', neglect: true},
                     {name:'status',value: '状态'},
                     {name:'userOwnerGroupName',value: '项目组'},
@@ -248,9 +227,10 @@
                     {name:'accountingArea',value: '结算', neglect: true},
                 ];
                 new Header({
-                    el: "headerParent",
+                    el: "table",
                     column: column,
-                    data: this.reports,
+                    isCheckAllBox: false,
+                    data: this.areas,
                     fixedTop:($('#form_div').height())+2,
                 }).init();
             },
@@ -261,20 +241,7 @@
                 areaExport(isAll){
                     let url = '{{url('customer/project/area/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.areas.forEach((el)=>{
-                            if (this.checkData.indexOf(el.id) === '-1'){
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
+                    excelExport(isAll,checkData,url,this.sum,token);
                 },
                 edit(area,index){
                     $("#editArea").modal("show");

+ 11 - 57
resources/views/customer/project/index.blade.php

@@ -43,7 +43,7 @@
             </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':'']"
+            <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                     data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                 导出Excel
             </button>
@@ -56,15 +56,10 @@
         <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
         @endif
         <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 class="table table-sm text-nowrap table-striped table-hover" id="table">
                 <tr v-for="(owner,i) in owners" :class="owner.id==id ? 'focusing' : ''"  @click="(selectTableRow(owner.id,$event)) && (id=owner.id)">
                     <td>
-                        <label><input type="checkbox" :value="owner.id" v-model="checkData"></label>
+                        <label><input type="checkbox" :value="owner.id"></label>
                     </td>
                     <td>@{{ i+1 }}</td>
                     <td>@{{ owner.name }}</td>
@@ -93,7 +88,7 @@
 @endsection
 
 @section('lastScript')
-    <script type="text/javascript" src="{{mix('js/queryForm/header.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 type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
     <script>
@@ -108,11 +103,6 @@
                         name : "{{$owner->name}}",
                         created_at : "{{$owner->created_at}}",
                         subjection : "{{$owner->subjection}}",
-                        /*contracts : [
-                            {{--@foreach($owner->contracts as $contract)
-                            { number:"{{$contract->contract_number}}",salesman:"{{$contract->salesman}}" },
-                            @endforeach--}}
-                        ],*/
                         customer_company_name:"{{$owner->customer ? $owner->customer->company_name : ''}}",
                         user_owner_group_name:"{{$owner->userOwnerGroup ? $owner->userOwnerGroup->name : ''}}",
                         user_work_group_name:"{{$owner->userWorkGroup ? $owner->userWorkGroup->name : ''}}",
@@ -121,7 +111,6 @@
                     },
                     @endforeach
                 ],
-                checkData : [],
                 sum : Number("{{ $owners->total() }}"),
                 priceModel : {},
                 thisClickIndex : "",
@@ -165,8 +154,6 @@
                 });
                 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:'name',value: '项目'},
                     {name:'customer',value: '客户'},
@@ -180,33 +167,12 @@
                     {name:'relating_price',value: '关联报价', neglect: true},
                     {name:'operating',value: '操作', neglect: true},
                 ];
-                let _this=this;
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.owners,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form_div').height())+2,
-                        offset:0.5,
-                        vue:vue
-                    });
-                    header.init();
-                },0);
-            },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.owners.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
-                }
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.owners,
+                    fixedTop:($('#form_div').height())+2,
+                }).init();
             },
             methods:{
                 selectTableRow(id,e){
@@ -221,19 +187,7 @@
                 executeExport(isAll){
                     let url = '{{url('customer/project/index/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.owners.forEach((el)=>{
-                            this.checkData.push(el.id);
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
+                    excelExport(isAll,checkData,url,this.sum,token);
                 },
                 showModal(owner){
                     if (this.priceModel[owner.id]){

+ 11 - 51
resources/views/finance/billConfirmation.blade.php

@@ -6,7 +6,7 @@
     <div class="container-fluid d-none" 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':'']"
+            <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                     data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                 导出Excel
             </button>
@@ -18,15 +18,10 @@
             @can("结算管理-账单确认-重置账单确认")<button data-toggle="modal" data-target="#resetBillConfirmation" class="btn btn-sm btn-outline-primary">重置账单确认</button>@endcan
         </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 class="table table-sm text-nowrap table-striped table-hover" id="table">
                 <tr v-for="(bill,i) in bills">
                     <td>
-                        <label><input type="checkbox" :value="bill.id" v-model="checkData"></label>
+                        <label><input type="checkbox" :value="bill.id"></label>
                     </td>
                     <td>@{{ i+1 }}</td>
                     <td>@{{ bill.ownerGroupName }}</td>
@@ -54,14 +49,13 @@
 @stop
 
 @section("lastScript")
-    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
     <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
     <script>
         let vue = new Vue({
             el:"#container",
             data:{
-                checkData:[],
                 bills : [
                     @foreach($bills as $bill)
                     {   id : "{{$bill->id}}",
@@ -98,20 +92,6 @@
                     owner:[],
                 }
             },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.bills.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
-                }
-            },
             mounted(){
                 $('#container').removeClass('d-none');
                 let data=[
@@ -131,8 +111,6 @@
                 });
                 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:'ownerGroupName',value: '项目小组'},
                     {name:'customerName',value: '客户'},
@@ -144,36 +122,18 @@
                     {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);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.reports,
+                    fixedTop:($('#form_div').height())+2,
+                }).init();
             },
             methods:{
                 billExport(isAll){
                     let url = '{{url('finance/billConfirmation/export')}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(isAll,this.checkData,url,this.sum,token);
-                },
-                //全选事件
-                checkAll(e){
-                    if (e.target.checked){
-                        this.checkData = [];
-                        this.bills.forEach((el)=>{
-                            this.checkData.push(el.id);
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
+                    excelExport(isAll,checkData,url,this.sum,token);
                 },
                 updateConfirmFee(bill){
                     let confirm_fee = $('#confirmFee-'+bill.id).val();

+ 18 - 58
resources/views/finance/instantBill.blade.php

@@ -24,7 +24,7 @@
         </div>
         <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':'']"
+            <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                     data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                 导出Excel
             </button>
@@ -36,22 +36,11 @@
             @can("结算管理-即时账单-重置即时账单")<button data-toggle="modal" data-target="#resetInstantBill" class="btn btn-sm btn-outline-primary">重置即时账单</button>@endcan
         </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" id="headerParent">
-                <tr class="text-center">
-                    <td colspan="2"></td>
-                    <td colspan="9" 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 class="table table-sm text-nowrap" id="table">
                 <tbody v-for="(bill,i) in bills" :class="i%2==0 ? 'bg-light-gray' : 'bg-white'">
                 <tr>
                     <td :rowspan="bill.rowspan">
-                        <label><input type="checkbox" :value="bill.id" v-model="checkData"></label>
+                        <label><input type="checkbox" :value="bill.id"></label>
                     </td>
                     <td :rowspan="bill.rowspan">@{{ i+1 }}</td>
                     <td :rowspan="bill.rowspan">@{{ bill.customerName }}</td>
@@ -92,14 +81,13 @@
 @stop
 
 @section("lastScript")
-    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
     <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
     <script>
         let vue = new Vue({
             el:"#container",
             data:{
-                checkData:[],
                 bills : [
                     @foreach($details as $detail)
                     {   id : "{{$detail->id}}",
@@ -172,8 +160,6 @@
                 });
                 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:'customerName',value: '客户', class: "bg-info"},
                     {name:'ownerName',value: '项目', class: "bg-info"},
@@ -192,52 +178,26 @@
                     {name:'logisticFee',value: '物流费', class: "bg-cyanogen", neglect: true},
                     {name:'total',value: '合计', class: "bg-cyanogen", neglect: true},
                 ];
-                let _this=this;
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.bills,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form_div').height())+2,
-                        offset:7.5,
-                        vue:vue
-                    });
-                    header.init();
-                },0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.bills,
+                    restorationColumn: 'id',
+                    fixedTop:($('#form_div').height())+2,
+                    before:[
+                        {colspan:'2',value: ''},
+                        {colspan:'9',value: '单据信息', class:"bg-light-info"},
+                        {colspan:'4',value: '物流作业信息', class:"bg-light-khaki"},
+                        {colspan:'4',value: '费用信息', class:"bg-light-cyanogen"},
+                    ],
+                }).init();
                 this.thisType = document.getElementsByName("type")[0].value;
             },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.bills.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:{
                 billExport(isAll){
                     let url = '{{url('finance/instantBill/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.bills.forEach((el)=>{
-                            this.checkData.push(el.id);
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
+                    excelExport(isAll,checkData,url,this.sum,token);
                 },
                 resetInstantBill(){
                     window.tempTip.setDuration(3000);

+ 13 - 56
resources/views/inventory/statement/changeInventory.blade.php

@@ -5,7 +5,7 @@
 <div id="list" class="d-none card container-fluid" style="min-width: 1500px">
     <div id="form_div"></div>
     <span class="dropdown">
-        <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
+        <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                 data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
             导出Excel
         </button>
@@ -14,15 +14,10 @@
             <a class="dropdown-item" @click="processExport(true)" href="javascript:">导出所有页</a>
         </div>
     </span>
-    <label for="all" id="cloneCheckAll" class="d-none">
-        <input id="all" type="checkbox" @click="checkAll($event)">全选
-    </label>
-    <table class="table table-sm table-bordered text-nowrap d-none" id="headerRoll"></table>
-    <table class="table table-sm table-striped table-bordered table-hover text-nowrap card-body mt-2" id="headerParent">
-        <tr id="header"></tr>
+    <table class="table table-sm table-striped table-bordered table-hover text-nowrap card-body mt-2" id="table">
         <tr v-for="(oracleActTransactingLog,i) in oracleActTransactingLogs" @click="selectedColor(oracleActTransactingLog.id,$event)">
             <td>
-                <input class="checkItem" type="checkbox" :value="oracleActTransactingLog" v-model="checkData">
+                <input class="checkItem" type="checkbox" :value="oracleActTransactingLog">
             </td>
             <td>@{{ i+1 }}</td>
             <td class="text-primary">@{{ oracleActTransactingLog.货主 }}</td>
@@ -55,7 +50,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue=new Vue({
             el:"#list",
@@ -64,11 +59,9 @@
                 page:Number('{{$page}}'),
                 owners:[
                     @foreach($owners as $owner)
-                    {{--{name:'{{$owner->customerid}}',value:'{{$owner->descr_c}}'},--}}
                     {name:'{{$owner->code}}',value:'{{$owner->name}}'},
                     @endforeach
                 ],
-                checkData:[],
                 maxPage:1,
                 sum:0,
                 isPage:true,
@@ -123,8 +116,6 @@
                     });
                 }
                 let column = [
-                    {name:'cloneCheckAll',customization:true,type:'checkAll',
-                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                     {name:'index',value: '序号', neglect: true},
                     {name:'货主',value: '货主', class:'text-primary'},
                     {name:'库位',value: '库位', class:'text-muted'},
@@ -142,37 +133,15 @@
                     {name:'在库数量',value: '在库数量', neglect: true},
                     {name:'占用数量',value: '占用数量', neglect: true},
                 ];
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.oracleActTransactingLogs,
+                    restorationColumn: 'rn',
+                    is_restorationColumn_asc:true,
+                    fixedTop:($('#form_div').height())+2,
+                }).init();
 
-                let header=null;
-                let _this = this;
-                setTimeout(function () {
-                    header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.oracleActTransactingLogs,
-                        restorationColumn: 'rn',
-                        is_restorationColumn_asc:true,
-                        fixedTop:($('#form_div').height())+2,
-                        offset:0.5,
-                        vue:vue
-                    });
-                    header.init();
-                },0);
-
-            },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.oracleActTransactingLogs.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:{
                 selectedColor(id,e){
@@ -210,24 +179,12 @@
                     }
                     window.location.href=url;
                 },
-                //全选事件
-                checkAll(e){
-                    if (e.target.checked){
-                        this.oracleActTransactingLogs.forEach((el,i)=>{
-                            if (this.checkData.indexOf(el) == '-1'){
-                                this.checkData.push(el);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
-                },
                 processExport(checkAllSign){
                     let url = '{{url('inventory/statement/allInventory/export')}}';
                     if (!this.isTotalStock)
                          url = '{{url('inventory/statement/changeInventory/export')}}';
                     let token='{{ csrf_token() }}';
-                    let data= JSON.stringify( this.checkData );
+                    let data= JSON.stringify( checkData );
                     excelExport(checkAllSign,data,url,this.sum,token);
                 },
             },

+ 12 - 52
resources/views/inventory/statement/dailyLog.blade.php

@@ -28,7 +28,7 @@
         </div>
         <div class="w-100 ml-4 mt-0 mb-0">
             <span class="dropdown">
-                <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
+                <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                         data-toggle="dropdown" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">
                     导出Excel
                 </button>
@@ -40,15 +40,10 @@
             @can('库存管理-库存体积-管理监听货主')<button class="btn btn-outline-info btn-sm tooltipTarget mt-1" @click="openModal()">管理监听货主</button>@endcan
         </div>
         <div class="card-body pt-1">
-            <label for="all" class="d-none" id="cloneCheckAll">
-                <input id="all" type="checkbox" @click="checkAll($event)">全选
-            </label>
-            <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-            <table class="table table-sm text-nowrap table-striped table-bordered m-0" id="headerParent">
-                <tr class="p-0" id="header"></tr>
+            <table class="table table-sm text-nowrap table-striped table-bordered m-0" id="table">
                 <tr v-for="(inventoryDailyLog,i) in inventoryDailyLogs" @click="selectedColor(i,$event)">
                    <td>
-                       <input type="checkbox" :value="inventoryDailyLog.id" v-model="checkData">
+                       <input type="checkbox" :value="inventoryDailyLog.id">
                    </td>
                     <td>@{{ i+1 }}</td>
                     <td>@{{ inventoryDailyLog.owner_name }}</td>
@@ -83,7 +78,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el:"#container",
@@ -112,27 +107,12 @@
                     {name:"{{$owner->id}}",value:"{{$owner->name}}"},
                     @endforeach
                 ],
-                checkData:[],
                 name : "",
                 loggingOwners : [],
                 seekOwners : [],
                 sum:{!! $inventoryDailyLogs->total() !!},
                 selectTr:''
             },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.inventoryDailyLogs.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
-                }
-            },
             mounted(){
                 $(".tooltipTarget").tooltip({'trigger': 'hover'});
                 $("#container").removeClass('d-none');
@@ -154,8 +134,6 @@
                 });
                 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: '货主'},
                     {name: 'created_at', value: '日期'},
@@ -171,18 +149,13 @@
                     {name: 'volumn_occupied', value: '总占用体积', neglect: true},
                     {name: 'gross_weight', value: '总毛重', neglect: true},
                 ];
-                let _this = this;
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.inventoryDailyLogs,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form').height())+2,
-                        vue:vue
-                    });
-                    header.init();
-                },0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.inventoryDailyLogs,
+                    restorationColumn: 'id',
+                    fixedTop:($('#form').height())+2,
+                }).init();
             },
             methods:{
                 selectedColor(id,e){
@@ -194,19 +167,6 @@
                     this.selectTr=id;
                     $(e.target).parent('tr').addClass('focusing')
                 },
-                //全选事件
-                checkAll(e) {
-                    if (e.target.checked) {
-                        this.inventoryDailyLogs.forEach((el) => {
-                            if (!el.id) this.checkData.push(el.id);
-                            if (el.id && this.checkData.indexOf(el.id) === -1) {
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    } else {
-                        this.checkData = [];
-                    }
-                },
                 openModal(){
                     let url = "{{url('inventory/statement/dailyLog/getLoggingOwner')}}";
                     axios.post(url).then(res=>{
@@ -259,7 +219,7 @@
                 dailyLogExport(checkAllSign){
                     let url = '{{url('inventory/statement/dailyLog/export')}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(checkAllSign,this.checkData,url,this.sum,token);
+                    excelExport(checkAllSign,checkData,url,this.sum,token);
                 },
             },
         });

+ 11 - 62
resources/views/inventory/statement/inventoryCompare.blade.php

@@ -79,7 +79,7 @@
         </div>
         <div class="w-100 ml-4 mt-0 mb-0">
             <span class="dropdown ">
-                <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
+                <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                         data-toggle="dropdown" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">
                     导出Excel
                 </button>
@@ -94,15 +94,10 @@
         </div>
     </span>
         <div class="card-body pt-1">
-            <label for="all" class="d-none" id="cloneCheckAll">
-                <input id="all" type="checkbox" @click="checkAll($event)">全选
-            </label>
-            <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-            <table class="table table-sm text-nowrap table-striped table-bordered m-0" id="headerParent">
-                <tr class="p-0" id="header"></tr>
+            <table class="table table-sm text-nowrap table-striped table-bordered m-0" id="table">
                 <tr v-for="(inventoryCompare,i) in inventoryCompares">
                    <td>
-                       <input type="checkbox" :value="inventoryCompare.id" v-model="checkData">
+                       <input type="checkbox" :value="inventoryCompare.id">
                    </td>
                     <td>@{{ i+1 }}</td>
                     <td>@{{ inventoryCompare.owner_name }}</td>
@@ -136,7 +131,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el:"#container",
@@ -166,24 +161,9 @@
                     @endforeach
                 ],
                 sum:{!! $inventoryCompares->total() !!},
-                checkData:[],
                 fakeOwners:'',
                 isSubmit:false,
             },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.inventoryCompares.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
-                }
-            },
             mounted(){
                 $(".tooltipTarget").tooltip({'trigger': 'hover'});
                 $("#container").removeClass('d-none');
@@ -208,8 +188,6 @@
                 });
                 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: '货主'},
                     {name:'mission_code',value: '任务号'},
@@ -223,33 +201,14 @@
                     {name: 'amount_in_compare', value: '参考库存', neglect: true},
                     {name: 'differ', value: '差值', neglect: true},
                 ];
-                let _this = this;
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.inventoryCompares,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form').height())+2,
-                        vue:vue
-                    });
-                    header.init();
-                },0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.inventoryCompares,
+                    fixedTop:($('#form').height())+2,
+                }).init();
             },
             methods:{
-                //全选事件
-                checkAll(e) {
-                    if (e.target.checked) {
-                        this.inventoryCompares.forEach((el) => {
-                            if (!el.id) this.checkData.push(el.id);
-                            if (el.id && this.checkData.indexOf(el.id) === -1) {
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    } else {
-                        this.checkData = [];
-                    }
-                },
                 importExcel(){
                     $('#importExcel').modal('show');
                 },
@@ -263,18 +222,8 @@
                 inventoryCompareExport(checkAllSign){
                     let url = '{{url('inventory/statement/inventoryCompare/export')}}'
                     let token='{{ csrf_token() }}';
-                    excelExport(checkAllSign,this.checkData,url,this.sum,token);
+                    excelExport(checkAllSign,checkData,url,this.sum,token);
                 },
-                // 定位货主(e){
-                //     let target = $(e.target).val();
-                //     if(target === ''){
-                //         this.fakeOwners = this.owners;
-                //     }else{
-                //         this.fakeOwners = this.fakeOwners.filter(function(map){
-                //             return map.value.includes(target) ;
-                //         })
-                //     }
-                // },
             },
         });
     </script>

+ 17 - 59
resources/views/inventory/stockInventory/inventoryMission.blade.php

@@ -26,7 +26,7 @@
             </span>
 
             <span class="dropdown">
-                <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
+                <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                         data-toggle="dropdown" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">
                     导出Excel
                 </button>
@@ -314,13 +314,8 @@
 
 
         <div class="card-body pt-1">
-            <label for="all" class="d-none" id="cloneCheckAll">
-                <input id="all" type="checkbox" @click="checkAll($event)">全选
-            </label>
-            <table class="table table-sm table-bordered d-none text-nowrap " id="headerRoll"></table>
             <table class="table table-sm table-striped d-none d-xl-block p-0 text-nowrap table-bordered"
-                   id="headerParent" ref="boxPc">
-                <tr class="p-0" id="header"></tr>
+                   id="table" ref="boxPc">
                 <tr v-for="(inventoryMission, i) in 显示记录列" :key="i"
                     :style="{'opacity': inventoryMission.mark==='跳过'?'0.7':'','opacity': inventoryMission.mark==='确认差异'?'0.7':''}" :class="[
                     inventoryMission.mark==='已复盘有差异'?'td-cool':'',
@@ -332,7 +327,7 @@
                     inventoryMission.mark==='跳过'?'text-muted':'',
                     ]">
                     <td>
-                        <input type="checkbox" :value="inventoryMission" v-model="checkData">
+                        <input type="checkbox" :value="inventoryMission">
                         <span :id="'lockLine'+(i+1)"></span>
                     </td>
                     <td>@{{ i+1 }}</td>
@@ -588,7 +583,7 @@
 
 @section('lastScript')
     <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
-    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let hideHeaderTitle = function () {
             let $listOnPad = $('#listOnPad');
@@ -669,7 +664,6 @@
                 库位盘点记录:[],
                 条码索引_记录: {},
                 库位索引_记录: {},
-                checkData: [],
                 selectedStyle:'',
                 指定盘点记录列:[],
                 lastStockInventoryRecord:{},
@@ -686,7 +680,7 @@
                 isManualInputtingBarcode:false,
                 isManualInputtingAmount:true,
                 lastScannedBarcode:'',
-                inputMode:'regular',//regular,increasing,multiIncreasing
+                inputMode:'regular',
                 location:'',
                 inputting:{
                     barcode:'',amount:'',bin:'',produce_date:'',valid_date:'',batch_number:'',fromIncreasing:false
@@ -694,27 +688,13 @@
                 status:{
                     scanEndInputted:false,binDisable:false,barcodeDisable:true,amountDisable:false,
                 },
-                goodses:[],//{barcode,amount,bin,produce_date,valid_date,batch_number}
+                goodses:[],
                 selectTr:''
             },
             beforeMount: function () {
                 this.重排序并标记全列表类型();
                 this.加载下方数据并置空上方数据()//初始化先调用一次
             },
-            watch: {
-                checkData: {
-                    handler() {
-                        if (this.checkData.length === this.inventoryMissions.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
-                }
-            },
             destroyed() {
                 window.removeEventListener('scroll', this.lazy)
             },
@@ -750,8 +730,6 @@
                     _this.listMode = false;
                 })();
                 let column = [
-                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
-                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                     {name:'index',value: '序号', neglect: true},
                     {name:'location',value: '库位'},
                     {name: 'commodity_name', value: '产品名'},
@@ -771,19 +749,13 @@
                     {name: 'occupied_amount', value: '分配数量', neglect: true},
                     {name: '跳过', value: '操作', neglect: true},
                 ];
-                setTimeout(function () {
-                    let _this=this;
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.inventoryMissions,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form').height())+2,
-                        vue:listVue,
-                    });
-                    header.init();
-                },0);
-                _this.建立记录索引();
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.inventoryMissions,
+                    fixedTop:($('#form').height())+2,
+                }).init();
+                this.建立记录索引();
             },
             methods:{
                 selectedColor(id,e){
@@ -881,17 +853,6 @@
                 inputs() {
                     return inputs;
                 },
-                checkAll(e) {
-                    if (e.target.checked) {
-                        this.inventoryMissions.forEach((el,i)=>{
-                            if (this.checkData.indexOf(el) == '-1'){
-                                this.checkData.push(el);
-                            }
-                        });
-                    } else {
-                        this.checkData = [];
-                    }
-                },
                 barcodePress(e){
                     if(e.key==='Enter') {
                         this.barcodeChange(e);
@@ -978,9 +939,6 @@
                     $jqueryTable.forEach(function (newDom,i) {
                         newDom.remove();
                     })
-                    // $appointInventoryList.forEach(function (inventoryMission,i) {
-                    //     $appointInventoryList.splice(i,1);
-                    // });
                     $appointInventoryList=[];
                     $showBlueTable.attr('class','d-none');
                     _this.selectingId='';
@@ -1427,7 +1385,7 @@
                     let _this = this;
                     if (!confirm('确定对勾选内容进行批量操作吗?')) {return ;}
                     let url = '{{url('inventory/批量跳过或确认差异')}}';
-                    axios.post(url, {checkData: _this.checkData}).then(
+                    axios.post(url, {checkData: checkData}).then(
                         function (response) {
                             if (!response.data.success) {
                                 tempTip.setDuration(3000);
@@ -1609,7 +1567,7 @@
                     }
                 },
                 清空checkbox(){
-                    this.checkData=[];
+                    checkData=[];
                 },
                 不覆盖() {
                     let _this = this;
@@ -1713,7 +1671,7 @@
                         let data = JSON.stringify(allData1);
                         excelExport(false,data,url,this.sum,token);
                     } else {
-                        this.checkData.forEach(function (inventoryMission) {
+                        checkData.forEach(function (inventoryMission) {
                             if (inventoryMission.stock_persons.length > 0) inventoryMission.stock_person = inventoryMission.stock_persons[inventoryMission.stock_persons.length - 1].name;
                             if (inventoryMission.stock_persons.length <1) inventoryMission.stock_person='';
                             delete inventoryMission.commodity_barcodes;
@@ -1721,7 +1679,7 @@
                             delete inventoryMission.stockInventoryPersons;
                             delete inventoryMission.commodity;
                         });
-                        let data = JSON.stringify(this.checkData);
+                        let data = JSON.stringify(checkData);
                         excelExport(checkAllSign,data,url,this.sum,token);
                     }
                 },

+ 10 - 53
resources/views/inventory/stockInventory/mission.blade.php

@@ -34,31 +34,11 @@
         </form>
         </div>
         <div id="form_div" class="mt-2"></div>
-
-{{--        <div class="card-header pt-0">--}}
-{{--            <div id="form"></div>--}}
-{{--            <span class="dropdown">--}}
-{{--        <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="inventoryExport(false)" href="javascript:">导出勾选内容</a>--}}
-{{--            <a class="dropdown-item" @click="inventoryExport(true)" href="javascript:">导出所有页</a>--}}
-{{--        </div>--}}
-{{--        </span>--}}
-{{--        </div>--}}
-
         <div class=" pt-1">
-            <label for="all" class="d-none" id="cloneCheckAll">
-                <input id="all" type="checkbox" @click="checkAll($event)">全选
-            </label>
-            <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-            <table class="table table-sm text-nowrap table-striped table-bordered m-0" id="headerParent">
-                <tr class="p-0" id="header"></tr>
+            <table class="table table-sm text-nowrap table-striped table-bordered m-0" id="table">
                 <tr v-for="(inventory,i) in inventoryAccounts" @click="selectedColor(inventory.id,$event)" :style="{'font-weight': inventory.id==selectedStyle?'bold':''}">
                     <td>
-                        <input class="checkItem" type="checkbox" :value="inventory.id" v-model="checkData">
+                        <input class="checkItem" type="checkbox" :value="inventory.id">
                     </td>
                     <td>
                         @can('库存管理-盘点')
@@ -112,12 +92,11 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el: "#list",
             data: {
-                {{--inventoryAccounts:{!! $inventoryAccounts->toJson()!!}['data'],--}}
                 inventoryAccounts : [
                         @foreach($inventoryAccounts as $inventory)
                     {id:'{{$inventory->id}}',owner_name:'{{$inventory->owner?$inventory->owner->name:''}}',
@@ -136,11 +115,8 @@
                     {name:'{{$owner->id}}',value:'{{$owner->name}}'},
                     @endforeach
                 ],
-                {{--owners:{!! $owners !!},--}}
-                checkData: [],
                 selectedStyle:'',
                 sum:{!! $inventoryAccounts->total() !!},
-                // formData:{},
                 date_end:'',location:'',barcode:'', date_start:'',
                 fakeOwners:'',
                 owner_id:'',
@@ -167,10 +143,7 @@
                     condition:data,
                 });
                 this.form.init();
-                let _this = this;
                 let column = [
-                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
-                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                     {name:'operation',value: '操作', neglect: true},
                     {name:'check',value: '审核', neglect: true},
                     {name:'index',value: '序号', neglect: true},
@@ -192,17 +165,12 @@
                     {name: 'creator', value: '创建人', neglect: true},
                     {name:'remove',value: '操作', neglect: true},
                 ];
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.inventoryAccounts,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form').height())+2,
-                        vue:vue
-                    });
-                    header.init();
-                },0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.inventoryAccounts,
+                    fixedTop:($('#form').height())+2,
+                }).init();
             },
             methods:{
                 selectedColor(id,e){
@@ -214,21 +182,10 @@
                     this.selectedStyle=id;
                     $(e.target).parent('tr').addClass('focusing')
                 },
-                checkAll(e){
-                    if (e.target.checked){
-                        this.inventories.forEach((el,i)=>{
-                            if (this.checkData.indexOf(el.id) == '-1'){
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
-                },
                 inventoryExport(checkAllSign){
                     let url = '{{url('inventory/stockInventoryExport')}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(checkAllSign,this.checkData,url,this.sum,token);
+                    excelExport(checkAllSign,checkData,url,this.sum,token);
                 },
                 //生成盘点任务
                 createInventoryMission(){

+ 5 - 9
resources/views/maintenance/role/index.blade.php

@@ -13,10 +13,7 @@
                 @if(Session::has('successTip'))
                     <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
                 @endif
-                <table class="table table-bordered table-sm d-none" id="headerRoll"></table>
-                <table class="table table-striped table-sm" id="headerParent">
-                    <tr id="header">
-                    </tr>
+                <table class="table table-striped table-sm" id="table">
                     <tr v-for="(role,i) in roles"  @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
                         <td class="text-muted">@{{role.id}}</td>
                         <td>@{{role.name}}</td>
@@ -51,7 +48,7 @@
 
 @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/header.js')}}"></script>{{--新版--}}
     <script>
         new Vue({
             el:"#list",
@@ -82,13 +79,12 @@
                     {name:'created_at',value: '创建时间'},
                     {name:'operation',value: '操作', neglect: true},
                 ];
-                let header = new Header({
+                new Header({
+                    el:"table",
                     column: column,
                     data: this.roles,
                     fixedTop: ($('#form_div').height())+2,
-                    restorationColumn: 'id',
-                });
-                header.init();
+                }).init();
             },
             methods:{
                 edit:function(id){

+ 5 - 16
resources/views/maintenance/user/index.blade.php

@@ -14,9 +14,7 @@
                     <div class="alert alert-success h1">{{Session::get('successTip')}}</div>
                 @endif
                 <div id="list">
-                    <table class="table table-bordered table-sm d-none" id="headerRoll"></table>
-                    <table class="table table-striped table-sm" id="headerParent">
-                        <tr id="header"></tr>
+                    <table class="table table-striped table-sm" id="table">
                         <tr v-for="(user,i) in users"  @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
                             <td class="text-muted">@{{user.id}}</td>
                             <td>@{{user.name}}</td>
@@ -59,19 +57,11 @@
 
     </script>
     <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/header.js')}}"></script>{{--新版--}}
     <script>
         new Vue({
             el:"#list",
             data:{
-                {{--users:[--}}
-                {{--    @foreach( $users as $user )--}}
-                {{--    {id:'{{$user->id}}',name:'{{$user->name}}',email:'{{$user->email}}',--}}
-                {{--        isSuperAdmin:'{{$user->isSuperAdmin}}',--}}
-                {{--        roles:{!! $user->roles !!},logistics:{!! $user->logistics !!},workgroup:{!! $user->userWorkgroups !!},created_at:'{{$user->created_at}}'},--}}
-                {{--    @endforeach--}}
-                {{--],--}}
-                {{--users:{!! $users !!},--}}
                 users:{!! $users->toJson() !!}['data'],
                 form:'',
                 selectTr:0
@@ -95,14 +85,13 @@
                     {name:'created_at',value: '创建时间'},
                     {name:'operation',value: '操作', neglect: true},
                 ];
-                let header = new Header({
+                new Header({
+                    el:"table",
                     column: column,
                     data: this.users,
                     fixedTop: ($('#form_div').height())+2,
-                    restorationColumn: 'id',
                     is_restorationColumn_asc:true,
-                });
-                header.init();
+                }).init();
             },
             methods:{
                 edit:function(id){

+ 32 - 70
resources/views/order/index/delivering.blade.php

@@ -57,12 +57,7 @@
                         </div><!-- /.modal-content -->
                     </div><!-- /.modal -->
                 </div>
-                <label for="all" id="cloneCheckAll" class="d-none">
-                    <input id="all" type="checkbox" @click="checkAll($event)">
-                </label>
-                <table class="table table-sm table-striped table-bordered table-hover card-body mt-2 ml-3 d-none" id="headerRoll"></table>
-                <table class="table table-sm table-striped table-bordered table-hover card-body mt-2 ml-3" id="headerParent">
-                    <tr class="text-nowrap" id="header"></tr>
+                <table class="table table-sm table-striped table-bordered table-hover card-body mt-2 ml-3" id="table">
                     <tr v-for="(order,i) in orders" @click="selectedColor(order.orderno)" :style="{'background-color': order.orderno==selectedStyle?'#aac7ea':''}">
                         <td>
                             <input class="checkItem" type="checkbox" :value="order.orderno" v-model="checkData">
@@ -242,7 +237,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue=new Vue({
             el:"#list",
@@ -251,7 +246,6 @@
                 paginate:Number('{{$request['paginate'] ?? 50}}'),
                 maxPage:1,
                 sum:0,
-                checkData:[],
                 owners:[
                         @foreach($customers as $customer)
                     { name:'{{$customer->customerid}}',value:'{{$customer->descr_c}}' },
@@ -340,8 +334,6 @@
                 });
                 this.form.init();
                 let column = [
-                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'orderno',
-                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                     {name:'index',value: '序号', neglect: true},
                     {name:'orderno',value: '编号'},
                     {name:'ordercodename',value: '订单状态'},
@@ -376,33 +368,15 @@
                     {name:'update',value: '订单冻结', neglect: true},
                     {name:'remove',value: '取消分配', neglect: true},
                 ];
-                let _this=this;
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.orders,
-                        restorationColumn: 'addtime',
-                        fixedTop:($('#form_div').height())+($('#btn').height())+1,
-                        offset:0.5,
-                        vue:vue
-                    });
-                    header.init();
-                },0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.orders,
+                    restorationColumn: 'addtime',
+                    fixedTop:($('#form_div').height())+($('#btn').height())+1,
+                }).init();
             },
             watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.orders.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
-                },
                 result_explain:function(){
                     this.setLogisticInfo()
                     this.setMerchantInfo()
@@ -444,18 +418,6 @@
                     }
                     window.location.href=url;
                 },
-                //全选事件
-                checkAll(e){
-                    if (e.target.checked){
-                        this.orders.forEach((el,i)=>{
-                            if (this.checkData.indexOf(el.orderno) == '-1'){
-                                this.checkData.push(el.orderno);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
-                },
                 unfold(orderno){
                     this.$set(this.isBtn,orderno,true);
                     setTimeout(function () {
@@ -465,7 +427,7 @@
                 orderExport(checkAllSign){
                     let url = '{{url('order/index/export')}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(checkAllSign,this.checkData,url,this.sum,token,{is_merge : this.is_merge});
+                    excelExport(checkAllSign,checkData,url,this.sum,token,{is_merge : this.is_merge});
                 },
                 modal(){
                     $("#myModal").modal('show');
@@ -473,15 +435,15 @@
                 //批量冻结
                 freezeAll:function(){
                     let _this=this;
-                    if(_this.checkData.length===0){
+                    if(checkData.length===0){
                         tempTip.show('没有勾选记录');
                         return
                     }
                     if(!confirm("确定要标记所有勾选内容为'冻结'吗")){return;}
-                    axios.post('{{url('order/freezeAll')}}',{checkData:_this.checkData}).then(function(response){
+                    axios.post('{{url('order/freezeAll')}}',{checkData:checkData}).then(function(response){
                         if(response.data.success){
                             _this.orders.forEach(function(order){
-                                _this.checkData.forEach(function (checkedId) {
+                                checkData.forEach(function (checkedId) {
                                     if(order.orderno===checkedId){
                                         order.releasestatus='H';
                                         order.waveno='*';
@@ -502,15 +464,15 @@
                 //批量取消分配
                 deAllocationAll(){
                     let _this=this;
-                    if(_this.checkData.length===0){
+                    if(checkData.length===0){
                         tempTip.show('没有勾选记录');
                         return
                     }
                     if(!confirm("确定要所有勾选内容'取消分配'吗")){return;}
-                    axios.post('{{url('order/deAllocationAll')}}',{checkData:_this.checkData}).then(function(response){
+                    axios.post('{{url('order/deAllocationAll')}}',{checkData:checkData}).then(function(response){
                         if(response.data.success){
                             _this.orders.forEach(function(order){
-                                _this.checkData.forEach(function (checkedId) {
+                                checkData.forEach(function (checkedId) {
                                     if(order.orderno===checkedId){
                                         order.sostatus='00';
                                         order.waveno='*';
@@ -532,14 +494,14 @@
                 },
                 batchComments(){
                     let _this=this;
-                    if (this.checkData.length<1 || !this.content) {
+                    if (checkData.length<1 || !this.content) {
                         $("#myModal").modal('hide');
                         tempTip.setDuration(3000);
-                        if (this.checkData.length<1) tempTip.showSuccess('没有勾选任何记录');
+                        if (checkData.length<1) tempTip.showSuccess('没有勾选任何记录');
                         else tempTip.showSuccess('没有输入任何内容');
                         return;
                     }
-                    axios.post('{{url('order/create/batchComments')}}',{checkData:this.checkData,content:this.content})
+                    axios.post('{{url('order/create/batchComments')}}',{checkData:checkData,content:this.content})
                         .then(function (response) {
                             let sign=[];
                             _this.orders.every(function (order) {
@@ -644,7 +606,7 @@
                     order.is_unfold=false;
                 },
                 orderIssueTag(){
-                    if( this.checkData.length === 0){
+                    if( checkData.length === 0){
                         tempTip.setDuration(2000);
                         tempTip.show('没有勾选记录');
                         return;
@@ -661,17 +623,17 @@
                     let _this = this;
                     tempTip.setDuration(99999);
                     tempTip.waitingTip('处理中,请稍候');
-                    let data = {orderNos:this.checkData,typeId: this.typeId,result_explain:this.result_explain};
+                    let data = {orderNos:checkData,typeId: this.typeId,result_explain:this.result_explain};
                     axios.post("{{url('apiLocal/order/issue/orderIssueTag')}}",data).then(function(res){
                         tempTip.setDuration(5000);
                         tempTip.cancelWaitingTip();
                         if(res.data.success){
                             tempTip.setDuration(3000);
                             tempTip.showSuccess('已标记为问题件');
-                            _this.checkData.forEach(function(orderNo){
+                            checkData.forEach(function(orderNo){
                                 _this.orderIssueNos.push(orderNo)
                             });
-                            _this.checkData = []
+                            checkData = []
                         }else{
                             console.log(res.data);
                             if(res.data.exitsOrderNos){
@@ -690,7 +652,7 @@
                 },
                 //重置快递获取标记
                 resetLogisticsGetMark(){
-                    if (this.checkData.length < 1){
+                    if (checkData.length < 1){
                         tempTip.setDuration(3000);
                         tempTip.showSuccess('未选择任何单号');
                         return
@@ -698,10 +660,10 @@
                     if (!confirm('确定要重置这些单的快递获取标记吗?'))return;
                     let url = '{{url('order/resetLogisticsGetMark')}}';
                     let _this = this;
-                    axios.post(url,{orderno : this.checkData})
+                    axios.post(url,{orderno : checkData})
                         .then(function (response) {
                             if (response.data.success){
-                                _this.checkData.forEach(orderno => {
+                                checkData.forEach(orderno => {
                                     _this.orders.some(order => {
                                         if (order.orderno === orderno && order.edisendflag2 === 'W'){
                                             order.edisendflag2 = "N";
@@ -730,17 +692,17 @@
                 },
                 isRejectedBillExist(){
                     let _this=this;
-                    if(_this.checkData.length===0){
+                    if(checkData.length===0){
                         tempTip.show('没有勾选记录');
                         return
                     }
-                    tempTip.confirm("是否要生成“"+this.checkData+"”的退货单?",()=> {
+                    tempTip.confirm("是否要生成“"+checkData+"”的退货单?",()=> {
                         let _this = this;
                         let arr = [];
                         window.tempTip.setDuration(9999);
                         window.tempTip.waitingTip("生成中,请稍等......")
                         this.orders.forEach(order=> {
-                            if (this.checkData.includes(order.orderno))arr.push(order.soreference1);
+                            if (checkData.includes(order.orderno))arr.push(order.soreference1);
                         });
                         axios.post('{{url('order/isRejectedBillExist')}}',{data:arr})
                             .then(function (response) {
@@ -763,7 +725,7 @@
                 },
                 createRejectedBill() {
                     let url = '{{url('order/createRejectedBill')}}';
-                    axios.post(url,{data:this.checkData})
+                    axios.post(url,{data:checkData})
                         .then(res=>{
                             if (res.data.success){
                                 tempTip.cancelWaitingTip();
@@ -782,7 +744,7 @@
                         });
                 },
                 isExistByOrderNos(){
-                    let orderNos = this.checkData;
+                    let orderNos = checkData;
                     let data = {orderNos:orderNos};
                     let _this = this;
                     axios.post("{{url('apiLocal/order/issue/isExistByOrderNo')}}",data).then(function(res){
@@ -846,7 +808,7 @@
                 },
                 copyLogisticNumber(){
                     let text="";
-                    this.checkData.forEach((code,i)=>{
+                    checkData.forEach((code,i)=>{
                         if(this.picktotraceidMap[code] && this.picktotraceidMap[code].length>1){
                             this.picktotraceidMap[code].forEach((number,j)=>{
                                 text += number+"\r\n";

+ 5 - 8
resources/views/order/index/index.blade.php

@@ -8,8 +8,7 @@
     <div class="card">
         <div class="card-body">
             <button class="btn  btn-outline-info mb-1" data-toggle="modal" data-target="#importModal">导入</button>
-            <table class="table table-striped table-hover" id="headerParent">
-                <tr id="header"></tr>
+            <table class="table table-striped table-hover" id="table">
                 <tr v-for="(model,i) in models"  @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
                     <td>@{{ i+1 }}</td>
                     <td>@{{ model.orderNumber }}</td>
@@ -31,7 +30,7 @@
 @endsection
 
 @section('lastScript')
-<script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+<script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
 <script>
     new Vue({
         el:"#container",
@@ -71,13 +70,11 @@
                 {name:'createdAt',value: '导入日期'},
                 {name:'userName',value: '操作人'},
             ];
-            let header = new Header({
-                el: "#header",
+            new Header({
+                el: "table",
                 column: column,
                 data: this.models,
-                restorationColumn: 'id',
-            });
-            header.init();
+            }).init();
         },
         methods:{
             selectFile(){

+ 21 - 44
resources/views/order/issue/workload.blade.php

@@ -10,7 +10,6 @@
                 <span class="dropdown">
                     <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">
@@ -19,24 +18,9 @@
                     </div>
                 </span>
             </div>
-            <table class="table table-sm table-striped table-bordered table-hover card-body mt-2 ">
-                <tr class="text-nowrap" id="header"></tr>
-                <tr class="text-center">
-                    <th>
-                        <input type="checkbox" id="all" @click="checkAll($event)">
-                    </th>
-                    <th>序号</th>
-                    <th>问题件ID</th>
-                    <th>创建时间</th>
-                    <th>完结时间</th>
-                    <th>创建人</th>
-                    <th>结束人</th>
-                    <th>客户</th>
-                    <th>快递单号</th>
-                    <th>处理时效</th>
-                </tr>
+            <table class="table table-sm table-striped table-bordered table-hover card-body mt-2 " id="table">
                 <tr v-for="(workLoad,index) in workLoads" class="text-center">
-                    <td><input type="checkbox" v-model="checkData" :value="workLoad.id"></td>
+                    <td><input type="checkbox" :value="workLoad.id"></td>
                     <td>@{{ index+1 }}</td>
                     <td>@{{ workLoad.id }}</td>
                     <td>@{{ workLoad.created_at }}</td>
@@ -76,7 +60,7 @@
 @section('lastScript')
     <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
     <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
-    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let workLoadVue = new Vue({
             el: "#workLoad_div",
@@ -84,7 +68,6 @@
                 workLoads: {!! $workLoads->append(['createUser','endUser','processingTime',])->toJson()??[] !!},
                 users:{!! $users->toJson() !!},
                 owners:{!! $owners->toJson() !!},
-                checkData: [],
                 query: {
                     create_user_id: '{{$options['create_user_id']}}',
                     end_user_id: '{{$options['end_user_id']}}',
@@ -105,7 +88,6 @@
                 form:'',
             },
             mounted: function () {
-
                 $('#workLoad_div').removeClass('d-none');
                 let users = [];
                 let owners = [];
@@ -132,34 +114,29 @@
                     condition:data,
                 });
                 this.form.init();
-            },
-            watch: {
-                checkData: {
-                    handler() {
-                        if (this.checkData.length === this.workLoads.length) {
-                            document.querySelector('#all').checked = true;
-                        } else {
-                            document.querySelector('#all').checked = false;
-                        }
-                    },
-                    deep: true
-                }
+                let column = [
+                    {name:'index',value: '序号', neglect: true},
+                    {name:'id',value: '问题件ID', neglect: true},
+                    {name:'created_at',value: '创建时间', neglect: true},
+                    {name:'created_at',value: '完结时间', neglect: true},
+                    {name:'createUser',value: '创建人', neglect: true},
+                    {name:'endUser',value: '结束人', neglect: true},
+                    {name:'name',value: '客户', neglect: true},
+                    {name:'number',value: '快递单号', neglect: true},
+                    {name:'processingTime',value: '处理时效', neglect: true},
+                ];
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.waybills,
+                    fixedTop:($('#form_div').height())+2,
+                }).init();
             },
             methods: {
-                checkAll(e) {
-                    if (e.target.checked) {
-                        this.workLoads.forEach((el, i) => {
-                            if (this.checkData.indexOf(el.id) == '-1')
-                                this.checkData.push(el.id);
-                        });
-                    } else {
-                        this.checkData = [];
-                    }
-                },
                 exportSelected() {
                     let url = '{{url('order/issue/workLoad/export')}}';
                     let token = '{{ csrf_token() }}';
-                    excelExport(false, this.checkData, url, this.page.total, token);
+                    excelExport(false, checkData, url, this.page.total, token);
                 },
                 exportAll() {
                     let url = '{{url('order/issue/workLoad/export')}}';

+ 0 - 1
resources/views/order/tracking/index.blade.php

@@ -267,7 +267,6 @@
 @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>
     <style>
         .btn-border{
             border:1px solid rgba(108, 117, 125,0.3);

+ 0 - 2
resources/views/package/logistic/index.blade.php

@@ -56,9 +56,7 @@
 @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>
     <script>
         let vue = new Vue({
             el: "#list",

+ 11 - 50
resources/views/package/weigh/index.blade.php

@@ -12,7 +12,7 @@
         <div class="container-fluid">
             <div id="form_div"></div>
             <span class="dropdown">
-                <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget mt-1 mb-1" :class="[checkData.length>0?'btn-dark text-light':'']"
+                <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget mt-1 mb-1"
                         data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                     导出Excel
                 </button>
@@ -22,15 +22,10 @@
                 </div>
             </span>
             <div>
-                <label for="all" class="d-none" id="cloneCheckAll">
-                    <input id="all" type="checkbox" @click="checkAll($event)">全选
-                </label>
-                <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-                <table class="table table-striped table-sm text-nowrap table-hover" id="headerParent">
-                    <tr id="header"></tr>
+                <table class="table table-striped table-sm text-nowrap table-hover" id="table">
                     <tr v-for="(package,i) in packages" @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
                         <td>
-                            <input class="checkItem" type="checkbox" :value="package.id" v-model="checkData">
+                            <input class="checkItem" type="checkbox" :value="package.id">
                         </td>
                         <td>@{{ i+1  }}</td>
                         <td>@{{package.ownerName}}</td>
@@ -60,7 +55,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
             @if(isset($request))
         let request={!! json_encode($request) !!};
@@ -91,7 +86,6 @@
                     {name:'{{$owner->id}}',value:'{{$owner->name}}'},
                     @endforeach
                 ],
-                checkData:[],
                 form:'',
                 sum:{!! $packages->total() !!},
                 selectTr:0
@@ -119,8 +113,6 @@
                 });
                 _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:'ownerName',value: '货主'},
                     {name: 'logisticNumber', value: '快递单号'},
@@ -138,49 +130,18 @@
                     {name:'recipient',value: '收件人'},
                     {name:'recipientMobile',value: '收件人电话'},
                 ];
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.packages,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form_div').height())+2,
-                        offset:0.5,
-                        vue : vue,
-                    });
-                    header.init();
-                },0);
-            },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.packages.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
-                }
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.packages,
+                    fixedTop:($('#form_div').height())+2,
+                }).init();
             },
             methods:{
-                checkAll(e){
-                    if (e.target.checked){
-                        this.packages.forEach((el,i)=>{
-                            if (this.checkData.indexOf(el.id) == '-1'){
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
-                },
                 packageExport(checkAllSign){
                     let url = '{{url('package/export')}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(checkAllSign,this.checkData,url,this.sum,token);
+                    excelExport(checkAllSign,checkData,url,this.sum,token);
                 },
             },
             filters:{

+ 10 - 49
resources/views/package/weightExcepted/index.blade.php

@@ -27,7 +27,7 @@
                                 <td >
                                     <label style="margin-left: 5px"> 操作选定记录:</label>
                                     <span class="dropdown">
-                                        <button class="btn btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark':'btn-outline-dark']"
+                                        <button class="btn btn-sm form-control-sm dropdown-toggle tooltipTarget"
                                                 data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                                             导出Excel
                                         </button>
@@ -43,16 +43,11 @@
                     </form>
                 </div>
             <div class="card-body">
-                <label for="all" class="d-none" id="cloneCheckAll">
-                    <input id="all" type="checkbox" @click="checkAll($event)">全选
-                </label>
-                <table class="d-none table table-bordered text-nowrap" id="headerRoll"></table>
-                <table class="table table-striped table-sm text-nowrap" id="headerParent">
-                    <tr id="header"></tr>
+                <table class="table table-striped table-sm text-nowrap" id="table">
                     <tr v-for="(weightExcepted,i) in weightExcepteds" :style="weightExcepted.status=='上传异常'||weightExcepted.status=='下发异常'?'':color"
                         @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
                         <td>
-                            <input class="checkItem" type="checkbox" :value="weightExcepted.id" v-model="checkData">
+                            <input class="checkItem" type="checkbox" :value="weightExcepted.id">
                         </td>
                         <td>@{{ i+1 }}</td>
                         <td>@{{weightExcepted.logisticNumber}}</td>
@@ -87,7 +82,7 @@
 @endsection
 
 @section('lastScript')
-    <script type="text/javascript" src="{{mix('js/queryForm/header.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({
@@ -109,7 +104,6 @@
                     @endforeach
                 ],
                 filterData:{paginate:50},
-                checkData:[],
                 color:'color: red',
                 sum:{!! $weightExcepteds->total() !!},
                 selectTr:0
@@ -119,8 +113,6 @@
                $(".tooltipTarget").tooltip({'trigger':'hover'});
                $('#list').removeClass('d-none');
                let column = [
-                   {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
-                       dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                    {name:'index',value: '序号', neglect: true},
                    {name:'logisticNumber',value: '快递单号'},
                    {name:'carrierName',value: '物流公司'},
@@ -141,31 +133,11 @@
                    {name:'paperBoxName',value: '纸箱'},
                    {name:'status',value: '异常类型'},@endif
                ];
-               let _this = this;
-               setTimeout(function () {
-                   let header = new Header({
-                       el: "#header",
-                       column: column,
-                       data: _this.weightExcepteds,
-                       restorationColumn: 'id',
-                       vue : vue,
-                   });
-                   header.init();
-               },0);
-            },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.weightExcepteds.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
-                }
+               new Header({
+                   el: "table",
+                   column: column,
+                   data: this.weightExcepteds,
+               }).init();
             },
             methods:{
                 initInputs:function(){
@@ -187,21 +159,10 @@
                     var form = document.getElementById("optionSubmit");
                     form.submit();
                 },
-                checkAll(e){
-                    if (e.target.checked){
-                        this.weightExcepteds.forEach((el,i)=>{
-                            if (this.checkData.indexOf(el.id) == '-1'){
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
-                },
                 weightExport(checkAllSign){
                     let url = '{{url('package/weightExcepted/export/'.$view)}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(checkAllSign,this.checkData,url,this.sum,token);
+                    excelExport(checkAllSign,checkData,url,this.sum,token);
                 }
             }
         });

+ 12 - 48
resources/views/personnel/laborReport/index.blade.php

@@ -8,7 +8,7 @@
     <div class="d-none container-fluid modal-open" id="list" style="overflow: auto">
         <div id="form_div"></div>
         <span class="dropdown">
-                <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget mt-1 mb-1" :class="[checkData.length>0?'btn-dark text-light':'']"
+                <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget mt-1 mb-1"
                         data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                     导出Excel
                 </button>
@@ -17,15 +17,10 @@
                     <a class="dropdown-item" @click="laborReportExport(true)" href="javascript:">导出所有页</a>
                 </div>
             </span>
-        <label for="all" class="d-none" id="cloneCheckAll">
-            <input id="all" type="checkbox" @click="checkAll($event)">全选
-        </label>
-        <table class="table table-sm table-bordered d-none text-nowrap " id="headerRoll"></table>
-        <table class="table table-sm table-hover table-striped d-none d-xl-block p-0 text-nowrap table-bordered" id="headerParent">
-            <tr class="text-center" id="header"></tr>
+        <table class="table table-sm table-hover table-striped d-none d-xl-block p-0 text-nowrap table-bordered" id="table">
             <tr v-for="(laborReport,i) in laborReports"  @click="selectedColor(laborReport.id)" :style="{'font-weight': laborReport.id==selectedStyle?'bold':''}" @click="selectTableRow(i,$event)">
                 <td>
-                    <input class="checkItem" type="checkbox" :value="laborReport.id" v-model="checkData" />
+                    <input class="checkItem" type="checkbox" :value="laborReport.id"/>
                 </td>
                 <td>@{{ i+1  }}</td>
                 <td >
@@ -243,7 +238,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let today=(new Date());
         function isTomorrow(){
@@ -311,7 +306,6 @@
                         {name:'{{$userWorkGroup->id}}',value:'{{$userWorkGroup->name}}'},
                         @endforeach
                     ],
-                    checkData:[],
                     permittingWorkgroups:{!! $permittingWorkgroups !!},
                     totalWorkingHours:{!! $totalWorkingHours !!},
                     laborCompanies:[
@@ -461,8 +455,6 @@
                     });
                     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:'operation',value: '操作', neglect: true},
                         {name:'thisRoundRecordWorkingTime',value:'本次工作时长', neglect: true},
@@ -487,37 +479,20 @@
                         {name:'remove',value: '操作'},
                         @endcan
                     ];
+                    new Header({
+                        el: "table",
+                        column: column,
+                        data: this.laborReports,
+                        restorationColumn: 'id',
+                        fixedTop:($('#form_div').height())+2,
+                    }).init();
                     setTimeout(function () {
-                        let header = new Header({
-                            el: "#header",
-                            column: column,
-                            data: _this.laborReports,
-                            restorationColumn: 'id',
-                            fixedTop:($('#form_div').height())+2,
-                            offset:0.5,
-                            vue:vue
-                        });
-                        header.init();
                         let $dom_thisRecordWorkingTime=$('#dom_thisRoundRecordWorkingTime');
                         $dom_thisRecordWorkingTime.attr('title','用工总工时:'+_this.totalWorkingHours);
                         $dom_thisRecordWorkingTime.tooltip({'trigger':'manual'});
                         $dom_thisRecordWorkingTime.tooltip('show')
                     },0);
                 },
-                watch:{
-                    checkData:{
-                        handler(){
-                            if (this.checkData.length === this.laborReports.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:{
                     selectTableRow(id,e){
                         $('#headerParent tr[class=focusing]').removeClass('focusing')
@@ -608,21 +583,10 @@
                         }
                         this.selectedStyle=id;
                     },
-                    checkAll(e){
-                        if (e.target.checked){
-                            this.laborReports.forEach((el,i)=>{
-                                if (this.checkData.indexOf(el.id) == '-1'){
-                                    this.checkData.push(el.id);
-                                }
-                            });
-                        }else {
-                            this.checkData = [];
-                        }
-                    },
                     laborReportExport(checkAllSign){
                         let url = '{{url('laborReport/export')}}';
                         let token='{{ csrf_token() }}';
-                        excelExport(checkAllSign,this.checkData,url,this.sum,token);
+                        excelExport(checkAllSign,checkData,url,this.sum,token);
                     },
                     //门卫审核
                     guardClockAudit(id,user_duty_check_id){

+ 11 - 50
resources/views/personnel/report.blade.php

@@ -24,7 +24,7 @@
 
         <div id="form_div"></div>
         <div>
-            <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
+            <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                     data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                         导出Excel
             </button>
@@ -35,11 +35,7 @@
             <button class="ml-1 btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#selectedOwner">刷 新</button>
         </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 table-striped table-hover" id="headerParent">
+            <table class="table table-sm table-striped table-hover" id="table">
                 <tr class="text-center">
                     <td colspan="2"></td>
                     <td colspan="2" class="bg-light-purple">日期信息</td>
@@ -50,7 +46,7 @@
                 <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>
+                        <label><input type="checkbox" :value="report.id"></label>
                     </td>
                     <td>@{{ i+1 }}</td>
                     <td>@{{ report.countingMonth }}</td>
@@ -94,7 +90,7 @@
 
 @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/header.js')}}"></script>{{--新版--}}
     <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
     <script>
         let vue = new Vue({
@@ -146,7 +142,6 @@
                     {name:"激活",value:"激活"},
                     {name:"冻结",value:"冻结"},
                 ],
-                checkData : [],
                 sum : Number("{{ $reports->total() }}"),
                 errors:[],
                 type:0,
@@ -171,39 +166,17 @@
                     condition:data,
                 });
                 this.form.init();
-                setTimeout(()=>{
-                    this.header = new Header({
-                        el: "#header",
-                        column: this._getRenderingHeader(),
-                        data: this.reports,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form_div').height())+2,
-                        offset:0.5,
-                        vue:vue
-                    });
-                    this.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
-                }
+                new Header({
+                    el: "table",
+                    column: this._getRenderingHeader(),
+                    data: this.reports,
+                    fixedTop:($('#form_div').height())+2,
+                }).init();
             },
             methods : {
                 _getRenderingHeader()
                 {
                     let column = [
-                        {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
-                            dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                         {name:'index',value: '序号', neglect: true},
                         {name:'countingMonth',value: '结算月' ,class:"bg-purple"},
                         {name:'ownerStorageDuration',value: '入仓时长' ,class:"bg-purple"},
@@ -260,19 +233,7 @@
                 reportExport(isAll){
                     let url = '{{url('personnel/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)=>{
-                            this.checkData.push(el.id);
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
+                    excelExport(isAll,checkData,url,this.sum,token);
                 },
                 createReport(isAll = false){
                     let dom = $("#owners");

+ 14 - 58
resources/views/process/index.blade.php

@@ -8,7 +8,7 @@
         <div class="container-fluid">
             <div id="form_div"></div>
             <span class="dropdown">
-            <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
+            <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                     data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                 导出Excel
             </button>
@@ -158,20 +158,14 @@
                 </div><!-- /.modal-content -->
             </div><!-- /.modal -->
         </div>
-        <label for="all" class="d-none" id="cloneCheckAll">
-            <input id="all" type="checkbox" @click="checkAll($event)">全选
-        </label>
-        <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-        <table class="table table-sm text-nowrap table-bordered" id="headerParent">
-            <tr class="row-even p-0" id="header"></tr>
+        <table class="table table-sm text-nowrap table-bordered" id="table">
             <template>
             <tr v-for="(processOne,i) in processes" :class="[(count(i,processes)%2===0?'row-even':'' ),selectTr===i+1?'focusing':'']" :id="processOne.id?processOne.id:processes[i-1].id+'-2'"
                 :name="'process_table_'+count(i,processes)" @mouseover="changeStyle('process_table_'+count(i,processes),true)"
                 @mouseout="changeStyle('process_table_'+count(i,processes),false)"
-                @click="selectTr===i+1?(selectTr=0):selectTr=i+1"
-            >
+                @click="selectTr===i+1?(selectTr=0):selectTr=i+1">
                 <td v-if="processOne.id" :rowspan="processOne.is_multi_row?2:''">
-                    <input class="checkItem" type="checkbox" :value="processOne.id" v-model="checkData">
+                    <input class="checkItem" type="checkbox" :value="processOne.id">
                 </td>
                 <td v-if="processOne.id" class="text-muted" :rowspan="processOne.is_multi_row?2:''" >@{{ count(i,processes) }}</td>
                 <td v-if="processOne.id" style="min-width:200px;" :rowspan="processOne.is_multi_row?2:''">
@@ -439,10 +433,6 @@
                                     <span v-else>@{{ (processDailyParticipant.hour_count)*(processDailyParticipant.hour_price) }}</span>
                                 </div>
                             </td>
-                        {{--    <td class="text-danger">
-                                @can("人事管理-任务审核")<button @click="processDailyParticipantAudit(processDailyParticipant.id)" v-if="processDailyParticipant.status=='未审核'" class="btn btn-sm btn-outline-success">审核</button>@endcan
-                                <b v-else class="text-success">@{{ processDailyParticipant.status }}</b>
-                            </td>--}}
                             <td>
                                 <div v-if="processDailyParticipant.user_detail_full_name">
                                     @can("二次加工管理-临时工资料管理")<u class="text-info" style="cursor:pointer"
@@ -466,7 +456,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el:"#process",
@@ -498,7 +488,6 @@
                     {name:'交接完成',value:'交接完成'},
                 ],
                 errors:{},
-                checkData:[],
                 processDailies:[],
                 processDailyParticipants:[],
                 isShow:{
@@ -518,20 +507,6 @@
                 sum:{!! $processes->total() !!},
                 selectTr:''
             },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.processes.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
-                }
-            },
             mounted:function () {
                 this.resetProcessData();
                 $(".tooltipTarget").tooltip({'trigger': 'hover'});
@@ -560,8 +535,6 @@
                 this.form.init();
                 let _this = this;
                 let column = [
-                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
-                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                     {name:'index',value: '序号', neglect: true},
                     {name:'operation',value: '操作', neglect: true},
                     {name: 'status', value: '状态'},
@@ -583,18 +556,14 @@
                     {name:'balance_remark', value: '结算备注'},
                     {name:'remove',value: '', neglect: true},
                 ];
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.processes,
-                        restorationColumn: 'serial_number',
-                        fixedTop:($('#form_div').height())+2,
-                        is_restorationColumn_asc :true,
-                        vue:vue
-                    });
-                    header.init();
-                },0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.processes,
+                    restorationColumn: 'serial_number',
+                    fixedTop:($('#form_div').height())+2,
+                    is_restorationColumn_asc :true,
+                }).init();
             },
             methods: {
                 arrayFilter: function (processesContents, process) {
@@ -638,25 +607,12 @@
                         _this.processes.splice(index + 1, 0, processTemp);
                     });
                 },
-                //全选事件
-                checkAll(e) {
-                    if (e.target.checked) {
-                        this.processes.forEach((el, i) => {
-                            if (!el.id) this.checkData.push(el.id);
-                            if (el.id && this.checkData.indexOf(el.id) == '-1') {
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    } else {
-                        this.checkData = [];
-                    }
-                },
                 //导出excel
                 processExport(checkAllSign) {
                     let url = '{{url('process/export')}}';
                     let token='{{ csrf_token() }}';
                     //excelExport 定义在 js/queryForm/export.js
-                    excelExport(checkAllSign,this.checkData,url,this.sum,token);
+                    excelExport(checkAllSign,checkData,url,this.sum,token);
                 },
                 //获取登记工时
                 openProcessHour(process) {

+ 36 - 59
resources/views/process/statistic.blade.php

@@ -18,39 +18,9 @@
                 <a class="dropdown-item" @click="processStatisticExport(true)"  href="javascript:">导出所有页</a>
             </div>
         </span>
-        <table class="table table-striped text-nowrap table-hover" style="background: #fff;">
-            <tr>
-                <th>
-                    <label for="all">
-                        <input id="all" type="checkbox" @click="checkAll($event)">全选
-                    </label>
-                </th>
-                <th>序号</th>
-                <th>任务号</th>
-                <th>接单人</th>
-                <th>货主</th>
-                <th>开始日期</th>
-                <th>完成日期</th>
-                <th>创建日期</th>
-                <th>单价</th>
-                <th>预期数量</th>
-                <th>完成数量</th>
-                <th>收入合计</th>
-                <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>
+        <table class="table table-striped text-nowrap table-hover" style="background: #fff;" id="table">
             <tr v-for="(processStatistic,i) in processStatistics" :class="processStatistic.gross_profit_rate?'text-success':''">
-                <td><input class="checkItem" type="checkbox" :value="processStatistic.process_id" v-model="checkData"></td>
+                <td><input class="checkItem" type="checkbox" :value="processStatistic.process_id"></td>
                 <td>@{{ i+1 }}</td>
                 <td><span v-if="processStatistic.process">@{{ processStatistic.process.code }}</span></td>
                 <td><span v-if="processStatistic.operatorLog && processStatistic.operatorLog.user">@{{ processStatistic.operatorLog.user.name }}</span></td>
@@ -83,7 +53,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         new Vue({
             el:"#statistics",
@@ -103,7 +73,6 @@
                     {name:'{{ $processMethod->id }}',value:'{{ $processMethod->name }}'},
                     @endforeach
                 ],
-                checkData:[],
                 sum:{!! $processStatistics->total() !!},
                 filterData:{paginate:'50',started_at:'',ended_at:'',owner_id:'',code:'',status:''},
                 status:[
@@ -112,18 +81,6 @@
                     {name:'交接完成',value:'交接完成'},
                 ],
             },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.processStatistics.length){
-                            document.querySelector('#all').checked = true;
-                        }else {
-                            document.querySelector('#all').checked = false;
-                        }
-                    },
-                    deep:true
-                }
-            },
             mounted:function(){
                 $(".tooltipTarget").tooltip({'trigger':'hover'});
                 $('#statistics').removeClass('d-none');
@@ -147,25 +104,45 @@
                     condition: data,
                 });
                 this.form.init();
+                let column = [
+                    {name:'index',value: '序号', neglect: true},
+                    {name:'code',value: '任务号', neglect: true},
+                    {name:'user',value: '接单人', neglect: true},
+                    {name:'owner_name',value: '货主', neglect: true},
+                    {name:'started_at',value: '开始日期', neglect: true},
+                    {name:'ended_at',value: '完成日期', neglect: true},
+                    {name:'created_at',value: '创建日期', neglect: true},
+                    {name:'unit_price',value: '单价', neglect: true},
+                    {name:'amount',value: '预期数量', neglect: true},
+                    {name:'completed_amount',value: '完成数量', neglect: true},
+                    {name:'revenue',value: '收入合计', neglect: true},
+                    {name:'duration_days',value: '完成时间(天)', neglect: true},
+                    {name:'duration_man_hours',value: '总工时', neglect: true},
+                    {name:'process_method_name',value: '加工类型', neglect: true},
+                    {name:'top_capacity',value: '最高日产能', neglect: true},
+                    {name:'bottom_capacity',value: '最低日产能', neglect: true},
+                    {name:'average_capacity',value: '日均产能', neglect: true},
+                    {name:'total_cost',value: '合计成本', neglect: true},
+                    {name:'gross_profit',value: '毛利润', neglect: true},
+                    {name:'gross_profit_rate',value: '毛利率', neglect: true},
+                    {name:'status',value: '状态', neglect: true},
+                    {name:'remark',value: '加工备注', neglect: true},
+                    {name:'balance_remark',value: '结算备注', neglect: true},
+                ];
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.processStatistics,
+                    restorationColumn: 'id',
+                    fixedTop:($('#form_div').height())+2,
+                }).init();
             },
             methods: {
-                checkAll(e){
-                    if (e.target.checked){
-                        this.processStatistics.forEach(el=>{
-                            if (this.checkData.indexOf(el.process_id) == '-1'){
-                                this.checkData.push(el.process_id);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
-                },
                 //导出excel
                 processStatisticExport(checkAllSign){
                     let url = '{{url('process/statistic/export')}}';
                     let token='{{ csrf_token() }}';
-                    //excelExport 定义在 js/queryForm/export.js
-                    excelExport(checkAllSign,this.checkData,url,this.sum,token);
+                    excelExport(checkAllSign,checkData,url,this.sum,token);
                 },
             },
             filters:{

+ 10 - 41
resources/views/procurement/finance/checkBill.blade.php

@@ -8,7 +8,6 @@
         <div class="row mt-2">
         <span class="dropdown ml-3">
         <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>
@@ -18,16 +17,10 @@
         </div>
         </span>
         </div>
-        <label for="all" id="cloneCheckAll" class="d-none">
-            <input id="all" type="checkbox" @click="checkAll($event)">全选
-        </label>
-        <table class="table table-sm table-bordered text-nowrap d-none" id="headerRoll"></table>
-        <table class="table table-sm table-striped table-bordered table-hover text-nowrap card-body mt-2"
-               id="headerParent">
-            <tr id="header"></tr>
+        <table class="table table-sm table-striped table-bordered table-hover text-nowrap card-body mt-2" id="table">
             <tr v-for="(procurementCheckSheet,i) in procurementCheckSheets">
                 <td>
-                    <input class="checkItem" type="checkbox" :value="procurementCheckSheet.id" v-model="checkData">
+                    <input class="checkItem" type="checkbox" :value="procurementCheckSheet.id">
                 </td>
                 <td class="">@{{ procurementCheckSheet.procurement_code }}</td>
                 <td class="text-muted">@{{ procurementCheckSheet.procurement_at }}</td>
@@ -58,7 +51,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el: '#list',
@@ -104,7 +97,6 @@
                     {name:'{{$material->id}}',value:'{{$material->name}}'},
                     @endforeach
                 ],
-                checkData: [],
                 sum:{!! $procurementCheckSheets->total() !!},
                 procurement_check_sheet_status:{!! json_encode(\App\ProcurementCheckSheet::status,JSON_UNESCAPED_UNICODE) !!},
                 invoice_number:'',procurementCheckSheetId:null,
@@ -133,10 +125,6 @@
                 });
                 this.form.init();
                 let column = [
-                    {
-                        name: 'cloneCheckAll', customization: true, type: 'checkAll',column:'id',
-                        dom: $('#cloneCheckAll').removeClass('d-none'), neglect: true
-                    },
                     {name: 'code', value: '采购编号', neglect: true,class: 'text-center'},
                     {name: 'procurement_at', value: '采购日期',class: 'text-center'},
                     {name: '', value: '送货日期',class: 'text-center'},
@@ -153,33 +141,14 @@
                     {name: '', value: '填写发票号', neglect: true,class: 'text-center'},
                 ];
 
-                let _this = this;
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.procurementCheckSheets,
-                        restorationColumn: 'id',
-                        fixedTop: ($('#form_div').height()) + 2,
-                        offset: 0.5,
-                        vue: vue
-                    });
-                    header.init();
-                }, 0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.procurementCheckSheets,
+                    fixedTop: ($('#form_div').height()) + 2,
+                }).init();
             },
             methods: {
-                //全选事件
-                checkAll(e) {
-                    if (e.target.checked) {
-                        this.procurementCheckSheets.forEach((el, i) => {
-                            if (this.checkData.indexOf(el.id) == '-1') {
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    } else {
-                        this.checkData = [];
-                    }
-                },
                 fillInvoiceNumber(id){
                     let _this=this;
                     _this.procurementCheckSheetId=id;
@@ -217,7 +186,7 @@
                 checkBillExport(selectAll){
                     let url = '{{url('procurement/finance/checkBillExport')}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(selectAll,this.checkData,url,this.sum,token);
+                    excelExport(selectAll,checkData,url,this.sum,token);
                 },
 
             }

+ 10 - 42
resources/views/procurement/finance/monthlyBillReport.blade.php

@@ -8,7 +8,6 @@
         <div class="row mt-2">
         <span class="dropdown ml-3">
         <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>
@@ -18,16 +17,10 @@
         </div>
         </span>
         </div>
-        <label for="all" id="cloneCheckAll" class="d-none">
-            <input id="all" type="checkbox" @click="checkAll($event)">全选
-        </label>
-        <table class="table table-sm table-bordered text-nowrap d-none" id="headerRoll"></table>
-        <table class="table table-sm table-striped table-bordered table-hover text-nowrap card-body mt-2"
-               id="headerParent">
-            <tr id="header"></tr>
+        <table class="table table-sm table-striped table-bordered table-hover text-nowrap card-body mt-2" id="table">
             <tr v-for="(procurementTotalBill,i) in procurementTotalBills">
                 <td>
-                    <input class="checkItem" type="checkbox" :value="procurementTotalBill.id" v-model="checkData">
+                    <input class="checkItem" type="checkbox" :value="procurementTotalBill.id">
                 </td>
                 <td >@{{ procurementTotalBill.id }}</td>
                 <td class="text-muted">@{{ procurementTotalBill.counting_month }}</td>
@@ -44,7 +37,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el: '#list',
@@ -64,7 +57,6 @@
                     {name:'{{$supplier->id}}',value:'{{$supplier->name}}'},
                     @endforeach
                 ],
-                checkData: [],
                 sum:{!! $procurementTotalBills->total() !!},
                 procurement_total_bill_status:{!! json_encode(\App\ProcurementTotalBill::status,JSON_UNESCAPED_UNICODE) !!},
 
@@ -87,10 +79,6 @@
                 });
                 this.form.init();
                 let column = [
-                    {
-                        name: 'cloneCheckAll', customization: true, type: 'checkAll',column:'id',
-                        dom: $('#cloneCheckAll').removeClass('d-none'), neglect: true
-                    },
                     {name: 'id', value: '对账编号', neglect: true,class: 'text-center'},
                     {name: 'counting_month', value: '账单日期',class: 'text-center'},
                     {name: 'created_at', value: '提交日期',class: 'text-center'},
@@ -98,38 +86,18 @@
                     {name: 'total_payable', value: '总金额',class: 'text-center'},
                     {name: 'status', value: '状态',class: 'text-center'},
                 ];
-
-                let _this = this;
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.procurementTotalBills,
-                        restorationColumn: 'id',
-                        fixedTop: ($('#form_div').height()) + 2,
-                        offset: 0.5,
-                        vue: vue
-                    });
-                    header.init();
-                }, 0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.procurementTotalBills,
+                    fixedTop: ($('#form_div').height()) + 2,
+                }).init();
             },
             methods: {
-                //全选事件
-                checkAll(e) {
-                    if (e.target.checked) {
-                        this.procurementTotalBills.forEach((el, i) => {
-                            if (this.checkData.indexOf(el.id) == '-1') {
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    } else {
-                        this.checkData = [];
-                    }
-                },
                 procurementTotalBillExport(selectAll){
                     let url = '{{url('procurement/finance/procurementTotalBillExport')}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(selectAll,this.checkData,url,this.sum,token);
+                    excelExport(selectAll,checkData,url,this.sum,token);
                 },
             }
         });

+ 10 - 41
resources/views/procurement/finance/procurementBill.blade.php

@@ -8,7 +8,6 @@
         <div class="row mt-2">
         <span class="dropdown ml-3">
         <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>
@@ -18,16 +17,10 @@
         </div>
         </span>
         </div>
-        <label for="all" id="cloneCheckAll" class="d-none">
-            <input id="all" type="checkbox" @click="checkAll($event)">全选
-        </label>
-        <table class="table table-sm table-bordered text-nowrap d-none" id="headerRoll"></table>
-        <table class="table table-sm table-striped table-bordered table-hover text-nowrap card-body mt-2"
-               id="headerParent">
-            <tr id="header"></tr>
+        <table class="table table-sm table-striped table-bordered table-hover text-nowrap card-body mt-2" id="table">
             <tr v-for="(procurement,i) in procurements">
                 <td>
-                    <input class="checkItem" type="checkbox" :value="procurement.id" v-model="checkData">
+                    <input class="checkItem" type="checkbox" :value="procurement.id">
                 </td>
                 <td class="">@{{ procurement.code }}</td>
                 <td class="">@{{ procurement.created_at }}</td>
@@ -67,7 +60,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el: '#list',
@@ -88,7 +81,6 @@
                     {name:'{{$supplier->id}}',value:'{{$supplier->name}}'},
                     @endforeach
                 ],
-                checkData: [],
                 sum:{!! $procurements->total() !!},
                 procurement_status:{!! json_encode(\App\Procurement::status,JSON_UNESCAPED_UNICODE) !!},
                 procurement_id:'',cost_price:'',
@@ -122,10 +114,6 @@
                 });
                 this.form.init();
                 let column = [
-                    {
-                        name: 'cloneCheckAll', customization: true, type: 'checkAll',column:'id',
-                        dom: $('#cloneCheckAll').removeClass('d-none'), neglect: true
-                    },
                     {name: 'code', value: '采购编号', neglect: true,class: 'text-center'},
                     {name: 'code', value: '采购日期', neglect: true,class: 'text-center'},
                     {name: 'code', value: '接单日期', neglect: true,class: 'text-center'},
@@ -149,33 +137,14 @@
                     {name: '', value: '操作', neglect: true,class: 'text-center'},
                 ];
 
-                let _this = this;
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.procurements,
-                        restorationColumn: 'id',
-                        fixedTop: ($('#form_div').height()) + 2,
-                        offset: 0.5,
-                        vue: vue
-                    });
-                    header.init();
-                }, 0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.procurements,
+                    fixedTop: ($('#form_div').height()) + 2,
+                }).init();
             },
             methods: {
-                //全选事件
-                checkAll(e) {
-                    if (e.target.checked) {
-                        this.procurements.forEach((el, i) => {
-                            if (this.checkData.indexOf(el.id) == '-1') {
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    } else {
-                        this.checkData = [];
-                    }
-                },
                 changeCostPrice(id,cost_price){
                     this.procurement_id=id;
                     this.cost_price=cost_price;
@@ -205,7 +174,7 @@
                 procurementBillExport(selectAll){
                     let url = '{{url('procurement/finance/procurementBillExport')}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(selectAll,this.checkData,url,this.sum,token);
+                    excelExport(selectAll,checkData,url,this.sum,token);
                 },
 
             }

+ 7 - 31
resources/views/procurement/procurement/index.blade.php

@@ -42,7 +42,6 @@
         <div class="row mt-2">
         <span class="dropdown ml-3">
         <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>
@@ -60,18 +59,12 @@
             @can('采购管理-采购-编辑')
                 @include('procurement.procurement._addQuantity')
             @endcan
-            <span class="btn btn-sm btn-outline-primary ml-2" @click="createAnew(checkData)">重新发起</span>
+            <span class="btn btn-sm btn-outline-primary ml-2" @click="createAnew()">重新发起</span>
         </div>
-        <label for="all" id="cloneCheckAll" class="d-none">
-            <input id="all" type="checkbox" @click="checkAll($event)">全选
-        </label>
-        <table class="table table-sm table-bordered text-nowrap d-none" id="headerRoll"></table>
-        <table class="table table-sm table-striped table-bordered table-hover text-nowrap card-body mt-2"
-               id="headerParent">
-            <tr id="header"></tr>
+        <table class="table table-sm table-striped table-bordered table-hover text-nowrap card-body mt-2" id="table">
             <tr v-for="(procurement,i) in procurements"  @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
                 <td>
-                    <input class="checkItem" type="checkbox" :value="procurement.id" v-model="checkData">
+                    <input class="checkItem" type="checkbox" :value="procurement.id">
                 </td>
                 <td class="">@{{ procurement.code }}</td>
                 <td><span v-if="procurement.owner_material.owner">@{{ procurement.owner_material.owner.name }}</span></td>
@@ -117,7 +110,7 @@
 @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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el: '#list',
@@ -155,7 +148,6 @@
                 is_procurement:'',
                 procurement_type:{!! json_encode(\App\Procurement::type,JSON_UNESCAPED_UNICODE) !!},
                 procurement_status:{!! json_encode(\App\Procurement::status,JSON_UNESCAPED_UNICODE) !!},
-                checkData: [],
                 sum:{!! $procurements->total() !!},
                 owner_id:'{{old('owner_id')}}',
                 owner_material_id: '{{old('owner_material_id')}}',
@@ -201,10 +193,6 @@
                 });
                 this.form.init();
                 let column = [
-                    {
-                        name: 'cloneCheckAll', customization: true, type: 'checkAll', column: 'id',
-                        dom: $('#cloneCheckAll').removeClass('d-none'), neglect: true
-                    },
                     {name: 'code', value: '采购编号', neglect: true,class: 'text-center'},
                     {name: 'owner_id', value: '项目', class: 'text-center'},
                     {name: 'type', value: '单据类型', class: 'text-center'},
@@ -239,18 +227,6 @@
                 }, 0);
             },
             methods: {
-                //全选事件
-                checkAll(e) {
-                    if (e.target.checked) {
-                        this.procurements.forEach((el, i) => {
-                            if (this.checkData.indexOf(el.id) == '-1') {
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    } else {
-                        this.checkData = [];
-                    }
-                },
                 addProcurement() {
                     this.errors = {};
                     this.is_procurement='procurement';
@@ -408,7 +384,7 @@
                 procurementExport(selectAll) {
                     let url = '{{url('procurement/procurement/procurementExport')}}';
                     let token = '{{ csrf_token() }}';
-                    excelExport(selectAll, this.checkData, url, this.sum, token);
+                    excelExport(selectAll, checkData, url, this.sum, token);
                 },
                 cancel(id, type, code) {
                     window.tempTip.confirm('确定取消' + this.procurement_type[type] + ' ' + code, () => {
@@ -462,7 +438,7 @@
                     });
                 },
                 //从新创建procurement
-                createAnew(checkData){
+                createAnew(){
                     let _this=this;
                     let url="{{url('procurement/procurement/createAnew')}}";
                     let params={checkData:checkData};
@@ -474,7 +450,7 @@
                            res.data.data.forEach(function (procurement) {
                                _this.procurements.push(procurement);
                             });
-                            _this.checkData=[];
+                            checkData=[];
                             window.tempTip.setDuration(2000);
                             window.tempTip.showSuccess("重新发起成功");
                         }

+ 10 - 55
resources/views/rejected/search/analyze.blade.php

@@ -11,7 +11,6 @@
         <span class="dropdown m-1">
             <button
                     class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
-                    :class="[rejectedBills_checkBoxes.length>0?'btn-dark text-light':'']"
                     data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                 导出Excel
             </button>
@@ -22,16 +21,10 @@
                    href="javascript:">导出所有页</a>
             </div>
         </span>
-        <label id="cloneCheckAll" class="d-none">
-            <input type="checkbox" class="form-control-sm tooltipTarget" title="全选"
-                   id="checkSelectingAll" @click="checkBoxAllToggle($event)">
-        </label>
-        <table class="table table-striped table-sm table-bordered table-hover d-none" id="headerRoll"></table>
-        <table class="table table-striped table-sm table-bordered table-hover" style="background: #fff;" id="headerParent">
-            <tr id="header"></tr>
+        <table class="table table-striped table-sm table-bordered table-hover" style="background: #fff;" id="table">
             <tr v-for="(rejectedBill,index) in rejectedBills " :data-id="rejectedBill.id" @click="selectTableRow(index,$event)">
                 <td>
-                    <input type="checkbox" v-model="rejectedBills_checkBoxes" :value="rejectedBill.id_owner">
+                    <input type="checkbox" :value="rejectedBill.id_owner">
                 </td>
                 <td class="text-muted" style="opacity:0.7">
                     @{{ index+1 }}
@@ -62,15 +55,13 @@
 @section('lastScript')
     <script src="{{mix('js/queryForm/export.js')}}"></script>
     <script src="{{mix('js/queryForm/queryForm.js')}}"></script>
-    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el:"#list",
             data:{
                 rejectedBills : {!! $rejectedBills !!},
-                checkBoxAll:[],
                 sum : '{{count($rejectedBills)}}',
-                rejectedBills_checkBoxes:[],
                 owners:[
                     @foreach($owners as $owner)
                     {name:'{{$owner->id}}',value:'{{$owner->name}}'},
@@ -101,8 +92,6 @@
                 });
                 this.form.init();
                 let column = [
-                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id_owner',
-                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                     {name:'index',value: '序号', neglect: true},
                     {name:'owner_name',value: '货主', neglect: true},
                     {name:'bounce_amount',value: '退件数', neglect: true, class:'text-muted'},
@@ -111,34 +100,12 @@
                     {name:'in_storage_count',value: '入库数', neglect: true, class:'text-success font-weight-bold'},
                     {name:'not_in_storage_count',value: '未入库数', neglect: true},
                 ];
-                let _this = this;
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.rejectedBills,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form_div').height())+2,
-                        offset:0.5,
-                        vue:vue,
-                        checkbox:'rejectedBills_checkBoxes',
-                    });
-                    header.init();
-                },0);
-            },
-            watch:{
-                rejectedBills_checkBoxes:{
-                    handler(){
-                        if (this.rejectedBills_checkBoxes.length === this.rejectedBills.length){
-                            document.querySelector('#checkSelectingAll').checked = true;
-                            document.querySelector('#checkSelectingAll_temp').checked = true;
-                        }else {
-                            document.querySelector('#checkSelectingAll').checked = false;
-                            document.querySelector('#checkSelectingAll_temp').checked = false;
-                        }
-                    },
-                    deep:true
-                }
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.rejectedBills,
+                    fixedTop:($('#form_div').height())+2,
+                }).init();
             },
             methods:{
                 selectTableRow(id,e){
@@ -150,22 +117,10 @@
                     this.selectTr = id;
                     $(e.target).parent('tr').addClass('focusing')
                 },
-                checkBoxAllToggle:function(e){
-                    if (e.target.checked) {
-                        this.rejectedBills.forEach((el) => {
-                            if (!el.id) this.rejectedBills_checkBoxes.push(el.id);
-                            if (el.id && this.rejectedBills_checkBoxes.indexOf(el.id) == '-1') {
-                                this.rejectedBills_checkBoxes.push(el.id);
-                            }
-                        });
-                    } else {
-                        this.rejectedBills_checkBoxes = [];
-                    }
-                },
                 exportExcel:function(checkAllSign){
                     let url = '{{url('rejected/exportAnalyze')}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(checkAllSign,this.rejectedBills_checkBoxes,url,this.sum,token);
+                    excelExport(checkAllSign,checkData,url,this.sum,token);
                 },
             },
         });

+ 26 - 91
resources/views/rejected/search/general.blade.php

@@ -8,13 +8,12 @@
     </div>
     <div class="container-fluid">
         <div>
-            {{--        <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>
                 @endif                <div id="form_div"></div>
                 <span class="dropdown">
-                    <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget":class="[rejectedBills_checkBoxes.length>0?'btn-dark text-light':'']"
+                    <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                             data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                         导出Excel
                     </button>
@@ -23,27 +22,14 @@
                         <a class="dropdown-item" @click="exportExcel(true)" href="javascript:">导出所有页</a>
                     </div>
                 </span>
-                @can('退货管理-编辑')
-                    {{--                                        <select name="" class="tooltipTarget form-control-sm" style="vertical-align: middle"--}}
-                    {{--                                                title="将勾选记录的入库状态设定为是或否,仅对未完结状态的记录有效" @change="setIsLoaded_batch"--}}
-                    {{--                                                :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">--}}
-                    {{--                                            <option value="">修改入库</option>--}}
-                    {{--                                            <option value="1">设定为是</option>--}}
-                    {{--                                            <option value="0">设定为否</option>--}}
-                    {{--                                            <option value="null">无需入库</option>--}}
-                    {{--                                            <option value="2">待推单</option>--}}
-                    {{--                                        </select>--}}
-                @endcan
                 @can('退货管理-审核')
-                    <span class="btn btn-sm" @click="checkAll" style="cursor: pointer"
-                          :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">审核</span>
+                    <span class="btn btn-sm" @click="checkAll" style="cursor: pointer">审核</span>
                 @endcan
                 @can('退货管理-编辑')
-                    <span class="btn btn-sm" @click="finishAll" style="cursor: pointer"
-                          :class="[rejectedBills_checkBoxes.length>0?'btn-dark':'btn-outline-dark']">完结</span>
+                    <span class="btn btn-sm" @click="finishAll" style="cursor: pointer">完结</span>
                 @endcan
                 <span class="dropdown">
-                    <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget":class="[rejectedBills_checkBoxes.length>0?'btn-dark text-light':'']"
+                    <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
                             data-toggle="dropdown" title="将勾选记录的入库状态设定为是或否,仅对未完结状态的记录有效">
                         修改入库
                     </button>
@@ -59,32 +45,20 @@
                 @can('退货管理-编辑')
                     <a class="btn btn-sm btn-outline-dark" href="{{url('rejected/importRejectedNumber')}}" style="cursor: pointer">导入修改</a>
                 @endcan
-                <button class="btn btn-sm ml-2 btn-primary" v-if="rejectedBills_checkBoxes.length>0" @click="copyLogisticNumber()">复制快递单号</button>
-
-                <span for="checkSelectingAll" class="d-none" id="cloneCheckAll">
-                    <input type="checkbox" class="form-control-sm tooltipTarget" title="全选"
-                           id="checkSelectingAll" @click="checkBoxAllToggle($event)">
-                </span>
-
-
-                <table class="table table-striped table-sm table-bordered table-hover text-nowrap d-none" id="headerRoll" ></table>
-                <table class="table table-striped table-sm table-bordered table-hover text-nowrap table-body"  style="background: #fff;" id="headerParent">
-                    <tr id="header"></tr>
+                <button class="btn btn-sm ml-2 btn-primary" @click="copyLogisticNumber()">复制快递单号</button>
+                <table class="table table-striped table-sm table-bordered table-hover text-nowrap table-body"  style="background: #fff;" id="table">
                     <tr v-for="(rejectedBill,i) in rejectedBills" :data-id="rejectedBill.id" @click="selectTableRow(rejectedBill.id,$event)">
                         <td>
-                            <input type="checkbox" v-model="rejectedBills_checkBoxes" :value="rejectedBill.id"/>
+                            <input type="checkbox" :value="rejectedBill.id"/>
                         </td>
                         <td class="text-nowrap">
-{{--                            <span class="text-muted" style="opacity:0.7">@{{ i+1 }}</span> <span v-if="issueIds.includes(rejectedBill.id)" class="badge badge-pill badge-danger">问题件</span>--}}
                             <span class="text-muted" style="opacity:0.7">@{{ i+1 }}</span> <span v-if="rejectedBill.order_issue_rejected_bill" class="badge badge-pill badge-danger">问题件</span>
                         </td>
                         <td class="text-muted">
                             <span v-if="rejectedBill.is_checked==1" class="text-success">
                                 <span class="fa fa-check-square"></span> @{{ rejectedBill.checked_numbers }}
                             </span>
-                            <span v-else>
-                                未审核
-                            </span>
+                            <span v-else>未审核</span>
                         </td>
                         <td class="" :class="[rejectedBill.is_finished==1?'text-success':'text-muted']">@{{rejectedBill.is_finished | yesNo}}</td>
                         <td class="" :class="[rejectedBill.is_loaded==1?'text-success':'text-muted']">
@@ -195,19 +169,17 @@
     </script>
     <script src="{{mix('js/queryForm/export.js')}}"></script>
     <script 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/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el:"#list",
             data:{
                 rejectedBills:rejectedBills,
-                rejectedBills_checkBoxes:[],
                 owners:[
                         @foreach($owners as $owner)
                     {name:'{{$owner->id}}',value:'{{$owner->name}}'},
                     @endforeach
                 ],
-                {{--issueIds:{!! $issueIds !!},--}}
                 logistics:[
                         @foreach($logistics as $logistic)
                     {name:'{{$logistic->id}}',value:'{{$logistic->name}}'},
@@ -250,10 +222,7 @@
                     condition:data
                 });
                 this.form.init();
-                let _this = this;
                 let column = [
-                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
-                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                     {name:'index',value: '序号', neglect: true},
                     {name:'checked_numbers',value: '是否审核', neglect: true},
                     {name: 'is_finished', value: '是否完结',neglect: true},
@@ -282,33 +251,12 @@
                     {name:'operator_name',value: '录入人'},
                         @can('退货管理-编辑','退货管理-删除'){name:'remove',value: '操作', neglect: true},@endcan
                 ];
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.rejectedBills,
-                        restorationColumn: 'id',
-                        fixedTop:($('#form_div').height())+2,
-                        offset:0.5,
-                        vue:vue,
-                        checkbox : 'rejectedBills_checkBoxes',
-                    });
-                    header.init();
-                },0);
-            },
-            watch:{
-                rejectedBills_checkBoxes:{
-                    handler(){
-                        if (this.rejectedBills_checkBoxes.length === this.rejectedBills.length){
-                            document.querySelector('#checkSelectingAll').checked = true;
-                            document.querySelector('#checkSelectingAll_temp').checked = true;
-                        }else {
-                            document.querySelector('#checkSelectingAll').checked = false;
-                            document.querySelector('#checkSelectingAll_temp').checked = false;
-                        }
-                    },
-                    deep:true
-                }
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.rejectedBills,
+                    fixedTop:($('#form_div').height())+2,
+                }).init();
             },
             methods:{
                 selectTableRow(id,e){
@@ -322,11 +270,11 @@
                 },
                 copyLogisticNumber(){
                     let text="";
-                    this.rejectedBills_checkBoxes.forEach((id,i)=>{
+                    checkData.forEach((id,i)=>{
                         this.rejectedBills.some(bill=>{
                             if (bill.id == id){
                                 text += bill.logistic_number_return;
-                                if (i!==this.rejectedBills_checkBoxes.length-1)text += "\r\n";
+                                if (i!==checkData.length-1)text += "\r\n";
                                 return true;
                             }
                         });
@@ -378,7 +326,6 @@
                 },
                 edit(id){
                     window.location.href=editUrl+id+"/edit";
-                    // window.open(editUrl+id+"/edit",'_blank') ;
                 },
                 destroy:function(rejectedBill){
                     if(!confirm('确定要删除退货信息“' + rejectedBill.owner.name+':'+rejectedBill.logistic_number_return+ '”吗?')){return;}
@@ -417,7 +364,7 @@
                 },
                 setIsLoaded_batch:function(val){
                     let _this=this;
-                    if(_this.rejectedBills_checkBoxes.length===0){
+                    if(checkData.length===0){
                         tempTip.show('没有勾选记录');
                         $(e.target).val("");
                         return;
@@ -438,9 +385,9 @@
                         is_loadedLabel='无需入库';
                     }
                     if(!confirm("确定要标记所有勾选入库情况为'"+is_loadedLabel+"'吗")){return;}
-                    axios.post(ajaxCheckUrl,{ids:_this.rejectedBills_checkBoxes,is_loaded:is_loaded}).then(function(response){
+                    axios.post(ajaxCheckUrl,{ids:checkData,is_loaded:is_loaded}).then(function(response){
                         if(response.data.success){
-                            _this.rejectedBills_checkBoxes.forEach(function(id){
+                            checkData.forEach(function(id){
                                 _this.rejectedBills.forEach(function(bill){
                                     if(bill.id===id){
                                         bill.is_loaded=is_loaded;
@@ -461,26 +408,14 @@
                     });
                     $(e.target).val("")
                 },
-                checkBoxAllToggle:function(e){
-                    if (e.target.checked) {
-                        this.rejectedBills.forEach((el) => {
-                            if (!el.id) this.rejectedBills_checkBoxes.push(el.id);
-                            if (el.id && this.rejectedBills_checkBoxes.indexOf(el.id) == '-1') {
-                                this.rejectedBills_checkBoxes.push(el.id);
-                            }
-                        });
-                    } else {
-                        this.rejectedBills_checkBoxes = [];
-                    }
-                },
                 checkAll:function(){
                     let _this=this;
-                    if(_this.rejectedBills_checkBoxes.length===0){
+                    if(checkData.length===0){
                         tempTip.show('没有勾选记录');
                         return
                     }
                     if(!confirm("确定要标记所有勾选内容为'已审核'吗")){return;}
-                    axios.post(ajaxCheckAllURL,{ids:_this.rejectedBills_checkBoxes}).then(function(response){
+                    axios.post(ajaxCheckAllURL,{ids:checkData}).then(function(response){
                         if(response.data.success){
                             response.data.rejecteds.forEach(function (rejected) {
                                 _this.rejectedBills.forEach(function(rejectedBill){
@@ -526,15 +461,15 @@
                 },
                 finishAll:function(){
                     let _this=this;
-                    if(_this.rejectedBills_checkBoxes.length===0){
+                    if(checkData.length===0){
                         tempTip.show('没有勾选记录');
                         return
                     }
                     if(!confirm("确定要标记所有勾选内容为'已完结'吗")){return;}
-                    axios.post(ajaxFinishAllUrl,{ids:_this.rejectedBills_checkBoxes}).then(function(response){
+                    axios.post(ajaxFinishAllUrl,{ids:checkData}).then(function(response){
                         if(response.data.success){
                             _this.rejectedBills.forEach(function(rejectedBill){
-                                _this.rejectedBills_checkBoxes.forEach(function (checkedId) {
+                                checkData.forEach(function (checkedId) {
                                     if(rejectedBill.id===checkedId){
                                         rejectedBill.is_finished=1;
                                     }
@@ -555,7 +490,7 @@
                 exportExcel:function(checkAllSign){
                     let url = '{{url('rejected/export')}}';
                     let token='{{ csrf_token() }}';
-                    excelExport(checkAllSign,this.rejectedBills_checkBoxes,url,total,token);
+                    excelExport(checkAllSign,checkData,url,total,token);
                 },
 
             },

+ 6 - 19
resources/views/store/checkingReceive/mission.blade.php

@@ -42,9 +42,7 @@
         <button class="btn btn-sm btn-outline-info" @click="openImport()">导入</button>
     </div>
 
-    <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-    <table class="table table-striped table-sm text-nowrap table-hover mt-1" id="headerParent">
-        <tr id="header"></tr>
+    <table class="table table-striped table-sm text-nowrap table-hover mt-1" id="table">
         <tr v-for="(storeCheckingReceive,i) in storeCheckingReceives" @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
             <td>@{{ i+1 }}</td>
             <td>@{{ storeCheckingReceive.id }}</td>
@@ -77,7 +75,7 @@
 @stop
 
 @section('lastScript')
-    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <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({
@@ -135,25 +133,14 @@
                     {name:'created_at',value: '创建时间'},
                     {name:'operating',value: '操作', neglect: true},
                 ];
-                let header = new Header({
-                    el: "#header",
+                new Header({
+                    el: "table",
                     column: column,
-                    data: _this.storeCheckingReceives,
+                    data: this.storeCheckingReceives,
                     fixedTop:($('#form_div').height())+2,
-                    restorationColumn: 'id',
-                });
-                header.init();
+                }).init();
             },
             methods:{
-                checkAll(event){
-                    if (event.target.checked){
-                        this.packages.forEach((el)=>{
-                            if (this.checkData.indexOf(el.id) === '-1'){
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    }else this.checkData = [];
-                },
                 getFile(e){
                     this.excel.file = e.target.files[0];
                 },

+ 5 - 9
resources/views/store/checkingReceive/show.blade.php

@@ -94,9 +94,7 @@
         </div>
         <!-- pc >544 -->
         <div class="d-none d-sm-block">
-            <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-            <table class="table table-striped table-sm text-nowrap table-hover mt-1" id="headerParent">
-                <tr id="header"></tr>
+            <table class="table table-striped table-sm text-nowrap table-hover mt-1" id="table">
                 <tr v-for="(storeCheckingReceiveItem,i) in storeCheckingReceiveItems" @click="selectedColor(i,$event)">
                     <td>@{{ i+1 }}</td>
                     <td>@{{ storeCheckingReceiveItem.bin_number }}</td>
@@ -211,7 +209,7 @@
 @stop
 
 @section('lastScript')
-<script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+<script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
 <script>
     new Vue({
         el:"#container",
@@ -277,13 +275,11 @@
                 {name:'unique_code',value: '唯一码'},
                 {name:'operating',value: '操作', neglect: true},
             ];
-            let header = new Header({
-                el: "#header",
+            new Header({
+                el: "table",
                 column: column,
                 data: this.storeCheckingReceiveItems,
-                restorationColumn: 'id',
-            });
-            header.init();
+            }).init();
             this.scanListening();
         },
         methods:{

+ 8 - 47
resources/views/store/fast/index.blade.php

@@ -8,15 +8,10 @@
     </span>
     <div class="d-none" id="fast">
         <div class="container-fluid">
-            <label for="all" class="d-none" id="cloneCheckAll">
-                <input id="all" type="checkbox" @click="checkAll($event)">全选
-            </label>
-            <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-            <table class="table table-striped table-sm text-nowrap table-hover" id="headerParent">
-                <tr id="header"></tr>
+            <table class="table table-striped table-sm text-nowrap table-hover" id="table">
                 <tr v-for="(store,i) in stores" @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
                     <td>
-                        <input class="checkItem" type="checkbox" :value="store.id" v-model="checkData">
+                        <input class="checkItem" type="checkbox" :value="store.id">
                     </td>
                     <td>@{{ i+1  }}</td>
                     <td class="text-muted">@{{store.asn_code}}</td>
@@ -35,7 +30,7 @@
 @endsection
 
 @section('lastScript')
-    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el:'#fast',
@@ -45,12 +40,10 @@
                 {!! $store !!},
                 @endforeach
                 ],
-                checkData:[],
                 selectTr:''
             },
             mounted:function(){
                 $('#fast').removeClass('d-none');
-                let _this = this;
                 let column = [
                     {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
                         dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
@@ -63,43 +56,11 @@
                     {name:'remark',value: '备注'},
                     {name:'created_at',value: '生成时间'},
                 ];
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.stores,
-                        restorationColumn: 'id',
-                        vue:vue,
-                    });
-                    header.init();
-                },0);
-            },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.stores.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:{
-                checkAll(e){
-                    if (e.target.checked){
-                        this.stores.forEach((el,i)=>{
-                            if (this.checkData.indexOf(el.id) == '-1'){
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
-                },
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.stores,
+                }).init();
             }
         });
     </script>

+ 9 - 50
resources/views/store/fast/storeItem.blade.php

@@ -8,15 +8,10 @@
     </span>
     <div class="d-none" id="item">
         <div class="container-fluid">
-            <label for="all" class="d-none" id="cloneCheckAll">
-                <input id="all" type="checkbox" @click="checkAll($event)">全选
-            </label>
-            <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-            <table class="table table-striped table-sm text-nowrap table-hover" id="headerParent">
-                <tr id="header"></tr>
-                <tr v-for="(storeItem,i) in storeItems" @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
+            <table class="table table-striped table-sm text-nowrap table-hover" id="table">
+                <tr v-for="(storeItem,i) in storeItems" @click="selectTr===i+1?selectTr=0:selectTr=i+1">
                     <td>
-                        <input class="checkItem" type="checkbox" :value="storeItem.id" v-model="checkData">
+                        <input class="checkItem" type="checkbox" :value="storeItem.id">
                     </td>
                     <td>@{{ i+1  }}</td>
                     <td>@{{storeItem.store_asn_code}}</td>
@@ -38,7 +33,7 @@
 @endsection
 
 @section('lastScript')
-    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el:'#item',
@@ -48,15 +43,11 @@
                 {!! $storeItem !!},
                 @endforeach
                 ],
-                checkData:[],
                 selectTr:''
             },
             mounted:function(){
                 $('#item').removeClass('d-none');
-                let _this=this;
                 let column = [
-                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
-                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                     {name:'index',value: '序号', neglect: true},
                     {name:'store_asn_code',value: 'ASN编号'},
                     {name:'asn_line_code',value: 'ASN行号'},
@@ -69,44 +60,12 @@
                     {name:'status',value: '状态', class:'text-muted'},
                     {name:'created_at',value: '创建时间', class:'text-muted'},
                 ];
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.storeItems,
-                        restorationColumn: 'id',
-                        vue:vue,
-                    });
-                    header.init();
-                },0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.storeItems,
+                }).init();
             },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.storeItems.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:{
-                checkAll(e){
-                    if (e.target.checked){
-                        this.storeItems.forEach((el,i)=>{
-                            if (this.checkData.indexOf(el.id) == '-1'){
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
-                },
-            }
         });
     </script>
 @endsection

+ 8 - 46
resources/views/store/inStorage/index.blade.php

@@ -8,15 +8,10 @@
     </span>
     <div class="d-none container-fluid" id="list">
         <div id="form_div"></div>
-        <label for="all" class="d-none" id="cloneCheckAll">
-            <input id="all" type="checkbox" @click="checkAll($event)">全选
-        </label>
-        <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-        <table class="table table-striped table-sm text-nowrap table-hover" id="headerParent">
-            <tr id="header"></tr>
+        <table class="table table-striped table-sm text-nowrap table-hover" id="table">
             <tr v-for="(store,i) in stores" :id="'data-'+store.id" @click="selectTableRow(i,$event)">
                 <td>
-                    <input class="checkItem" type="checkbox" :value="store.id" v-model="checkData">
+                    <input class="checkItem" type="checkbox" :value="store.id">
                 </td>
                 <td>
                     <button class="btn btn-sm btn-outline-info" v-if="!store.isOpenStoreItem" @click="openStoreItems(store,i,$event);store.isOpenStoreItem=true">查看明细</button>
@@ -66,7 +61,7 @@
 
 @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/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el:'#list',
@@ -87,7 +82,6 @@
                     @endforeach
                 ],
                 store:{},
-                checkData:[],
                 selectTr:''
             },
             mounted:function(){
@@ -121,8 +115,6 @@
                 });
                 this.form.init();
                 let column = [
-                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
-                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                     {name:'',value: '操作', neglect: true},
                     {name:'index',value: '序号', neglect: true},
                     {name:'asn_code',value: 'ASN编号'},
@@ -133,30 +125,11 @@
                     {name:'remark',value: '备注'},
                     {name:'created_at',value: '生成时间'},
                 ];
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.stores,
-                        restorationColumn: 'id',
-                        vue:vue,
-                    });
-                    header.init();
-                },0);
-            },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.stores.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
-                }
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.stores,
+                }).init();
             },
             methods:{
                 selectTableRow(id,e){
@@ -179,17 +152,6 @@
                     let _this=this;
                     _this.store={};
                 },
-                checkAll(e){
-                    if (e.target.checked){
-                        this.stores.forEach((el,i)=>{
-                            if (this.checkData.indexOf(el.id) == '-1'){
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
-                },
             }
         });
     </script>

+ 8 - 49
resources/views/store/inStorage/storeItem.blade.php

@@ -8,15 +8,10 @@
     </span>
     <div class="d-none" id="item">
         <div class="container-fluid">
-            <label for="all" class="d-none" id="cloneCheckAll">
-                <input id="all" type="checkbox" @click="checkAll($event)">全选
-            </label>
-            <table class="table table-sm text-nowrap table-bordered d-none" id="headerRoll"></table>
-            <table class="table table-striped table-sm text-nowrap table-hover" id="headerParent">
-                <tr id="header"></tr>
+            <table class="table table-striped table-sm text-nowrap table-hover" id="table">
                 <tr v-for="(storeItem,i) in storeItems">
                     <td>
-                        <input class="checkItem" type="checkbox" :value="storeItem.id" v-model="checkData">
+                        <input class="checkItem" type="checkbox" :value="storeItem.id">
                     </td>
                     <td>@{{ i+1  }}</td>
                     <td>@{{storeItem.store_asn_code}}</td>
@@ -38,7 +33,7 @@
 @endsection
 
 @section('lastScript')
-    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el:'#item',
@@ -48,14 +43,10 @@
                 {!! $storeItem !!},
                 @endforeach
                 ],
-                checkData:[]
             },
             mounted:function(){
                 $('#item').removeClass('d-none');
-                let _this=this;
                 let column = [
-                    {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
-                        dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
                     {name:'index',value: '序号', neglect: true},
                     {name:'store_asn_code',value: 'ASN编号'},
                     {name:'asn_line_code',value: 'ASN行号'},
@@ -68,44 +59,12 @@
                     {name:'status',value: '状态', class:'text-muted'},
                     {name:'created_at',value: '创建时间', class:'text-muted'},
                 ];
-                setTimeout(function () {
-                    let header = new Header({
-                        el: "#header",
-                        column: column,
-                        data: _this.storeItems,
-                        restorationColumn: 'id',
-                        vue:vue,
-                    });
-                    header.init();
-                },0);
+                new Header({
+                    el: "table",
+                    column: column,
+                    data: this.storeItems,
+                }).init();
             },
-            watch:{
-                checkData:{
-                    handler(){
-                        if (this.checkData.length === this.storeItems.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:{
-                checkAll(e){
-                    if (e.target.checked){
-                        this.storeItems.forEach((el,i)=>{
-                            if (this.checkData.indexOf(el.id) == '-1'){
-                                this.checkData.push(el.id);
-                            }
-                        });
-                    }else {
-                        this.checkData = [];
-                    }
-                },
-            }
         });
     </script>
 @endsection

+ 5 - 0
resources/views/test.blade.php

@@ -49,6 +49,7 @@
     var tTD; //用来存储当前更改宽度的Table Cell,避免快速移动鼠标的问题
     var table = document.getElementById("table");
     var down = false;
+    console.log(table.rows[0].cells)
     for (i = 0; i < table.rows[0].cells.length; i++) {
         table.rows[0].cells[i].onmousedown = function () {
             //记录单元格
@@ -71,8 +72,11 @@
             //取出暂存的Table Cell
             if (tTD == undefined) tTD = this;
         }
+
     }
 
+
+
     document.onmouseup = function () {
         if (down) {
             //结束宽度调整
@@ -95,6 +99,7 @@
                 //调整该列中的每个Cell
                 table = tTD;
                 while (table.tagName != 'TABLE') table = table.parentElement;
+                console.log(table)
                 for (i = 0; i < table.rows.length; i++) {
                     table.rows[i].cells[tTD.cellIndex].width = tTD.width;
                 }

+ 0 - 509
resources/views/test1.blade.php

@@ -1,509 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
-    <title>表头列头固定 -- Sara</title>
-    <style>
-        table tr td{
-            border: 2px solid #d5aba1
-        }
-        table tr th{
-            border: 2px solid #1b1e21;
-        }
-        div.sticky {
-            position: -webkit-sticky;
-            position: sticky;
-            top: 0;
-            background-color: white;
-            z-index: 1030;
-        }
-    </style>
-    <script>
-        function aa(){
-            let ta = document.getElementById("table");
-            let tds = ta.getElementsByTagName("tr")[0].getElementsByTagName("td");
-            for (let i=0;i<tds.length;i++){
-                console.log(tds[i].offsetWidth);
-            }
-        }
-    </script>
-</head>
-<body>
-<div  class="sticky">
-    <table>
-        <tr>
-            <th style="min-width: 600px;">标题1</th>
-            <th style="min-width: 600px;">标题2</th>
-            <th style="min-width: 600px;">标题3</th>
-            <th style="min-width: 600px;">标题4</th>
-            <th style="min-width: 600px;">标题5</th>
-            <th style="min-width: 600px;">标题6</th>
-            <th style="min-width: 600px;">标题7</th>
-            <th style="min-width: 600px;">标题8</th>
-            <th style="min-width: 600px;" onclick="aa()">标题9</th>
-        </tr>
-    </table>
-</div>
-<table id="table">
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr><tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr><tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr><tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr><tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr><tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr><tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr><tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr><tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr><tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr><tr>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-        <td>111</td>
-    </tr>
-    <tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr>
-    <tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr>
-    <tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr>
-    <tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr>
-    <tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr><tr>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-        <td>222</td>
-    </tr>
-
-</table>
-</body>
-</html>

+ 8 - 42
resources/views/transport/waybill/delivering.blade.php

@@ -34,7 +34,7 @@
                 </div>
                 <div class="ml-4 mt-2">
                     <span class="dropdown">
-                        <button type="button" class="btn  btn-sm  form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'btn-outline-dark']"
+                        <button type="button" class="btn  btn-sm  form-control-sm dropdown-toggle tooltipTarget"
                                 data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                             导出Excel
                         </button>
@@ -47,18 +47,10 @@
             </div>
         </form>
         <div class="card">
-            <table class="table table-sm table-hover table-striped table-bordered d-none" id="headerRoll"></table>
-            <table class="card-body table table-sm table-hover table-striped table-bordered d-none d-sm-block p-0 text-nowrap" style="width: 100%" id="headerParent">
-                <tr style="width: 100%" id="header">
-                    <th class="td-operation">
-                        <label for="all">
-                            <input id="all" type="checkbox" @click="checkAll($event)">全选
-                        </label>
-                    </th>
-                </tr>
+            <table class="card-body table table-sm table-hover table-striped table-bordered d-none d-sm-block p-0 text-nowrap" style="width: 100%" id="table">
                 <tr v-for="(waybill,i) in waybills">
                     <td>
-                        <input class="checkItem" type="checkbox" :value="waybill.id" v-model="checkData">
+                        <input class="checkItem" type="checkbox" :value="waybill.id">
                     </td>
                     <td>@{{ i+1 }}</td>
                     <td>@{{ waybill.created_at }}</td>
@@ -175,7 +167,7 @@
     .color2{background-color: cornflowerblue}
 </style>
 <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
-<script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
+<script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
 <script>
     new Vue({
         el:"#list",
@@ -209,22 +201,9 @@
             filterData:{
                 created_at_start:'',created_at_end:'',waybill_number:'',carrier_bill:''
             },
-            checkData:[],
             errors:{},
             sum:{!! $waybills->total() !!},
         },
-        watch:{
-            checkData:{
-                handler(){
-                    if (this.checkData.length === this.waybills.length){
-                        document.querySelector('#all').checked = true;
-                    }else {
-                        document.querySelector('#all').checked = false;
-                    }
-                },
-                deep:true
-            }
-        },
         mounted:function(){
             let _this=this;
             $(".tooltipTarget").tooltip({'trigger':'hover'});
@@ -248,15 +227,13 @@
                 {name:'operation',value: '操作', neglect: true},
             ];
             if (window.innerWidth > 500){
-                let header = new Header({
-                    el: "#header",
+                new Header({
+                    el: "table",
                     column: column,
                     data: this.waybills,
                     restorationColumn: 'id',
                     fixedTop:($('#form_div').height())+2,
-                    offset:0.5,
-                });
-                header.init();
+                }).init();
             }
         },
         computed:{
@@ -286,21 +263,10 @@
                     });
                 }
             },
-            checkAll(e){
-                if (e.target.checked){
-                    this.waybills.forEach((el,i)=>{
-                        if (this.checkData.indexOf(el.id) == '-1'){
-                            this.checkData.push(el.id);
-                        }
-                    });
-                }else {
-                    this.checkData = [];
-                }
-            },
             waybillExport(checkAllSign){
                 let url = '{{url('transport/waybill/deliveringExport')}}';
                 let token='{{ csrf_token() }}';
-                excelExport(checkAllSign,this.checkData,url,this.sum,token);
+                excelExport(checkAllSign,checkData,url,this.sum,token);
             },
             enlarge(e){
                 e.target.style.width="150px";

+ 1 - 1
resources/views/transport/waybill/index.blade.php

@@ -275,7 +275,7 @@
     </style>
     <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>
+    <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版--}}
     <script>
         let vue = new Vue({
             el:'#list',

+ 11 - 55
resources/views/transport/waybill/waybillFinancialSnapshot/index.blade.php

@@ -44,7 +44,7 @@
     <div class="card-header">
     <label>操作选定记录:</label>
         <span class="dropdown">
-            <button class="btn btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark':'btn-outline-dark']"
+            <button class="btn btn-sm form-control-sm dropdown-toggle tooltipTarget"
                     data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
                 导出Excel
             </button>
@@ -55,22 +55,12 @@
         </span>
     </div>
     @endif
-    @if(!isset($excepted))
-        <label for="all" class="d-none" id="cloneCheckAll">
-            <input id="all" type="checkbox" @click="checkAll($event)">全选
-        </label>
-    @endif
-    <table class="d-none table table-bordered text-nowrap" id="headerRoll"></table>
-    <table class="table  table-hover table-bordered text-nowrap " style="width: 1500px;height: auto" id="headerParent">
-        <thead>
-        <tr style="background: #E8E8E8;@if(isset($excepted)) color: red; @endif" id="header"></tr>
-        </thead>
+    <table class="table  table-hover table-bordered text-nowrap " style="width: 1500px;height: auto" id="table">
         <tbody>
-
         <tr v-for="(json_content,i) in json_contents" :style="{background:json_content.type=='直发车'?'#F8F8F8':''}" @click="selectedColor(i,$event)">
             @if(!isset($excepted))
             <td>
-                <input class="checkItem" type="checkbox" :value="json_content.waybill_id" v-model="checkData">
+                <input class="checkItem" type="checkbox" :value="json_content.waybill_id">
             </td>
             @endif
             <td>@{{ i+1 }}</td>
@@ -124,7 +114,7 @@
 @stop
 
 @section('lastScript')
-<script type="text/javascript" src="{{mix('js/queryForm/header.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({
@@ -137,34 +127,17 @@
                 @endforeach
                 @endif
             ],
-            checkData:[],
             filterData:{
                 created_at_start:'',created_at_end:'',type:'{{$type}}',
             },
             sum:{!! $waybillFinancialSnapshots->total() !!},
             selectTr:''
         },
-        watch:{
-            checkData:{
-                handler(){
-                    if (this.checkData.length === this.json_contents.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
-            },
-        },
         mounted:function(){
             this.initInputs();
             $(".tooltipTarget").tooltip({'trigger':'hover'});
             $('#editingPanel').removeClass('d-none');
             let column = [
-                @if(!isset($excepted)){name:'cloneCheckAll',customization:true,type:'checkAll',column:'waybill_id',
-                    dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},@endif
                 {name:'index',value: '序号', neglect: true},
                 {name:'type',value: '运单类型', neglect: true},
                 {name:'waybill_number',value: '运单号', neglect: true},
@@ -198,18 +171,12 @@
                 {name:'gross_margin',value: '毛利', neglect: true},
                 {name:'gross_profit_rate',value: '毛利率', neglect: true},
             ];
-            let _this = this;
-            setTimeout(function () {
-                let header = new Header({
-                    el: "#header",
-                    column: column,
-                    data: _this.json_contents,
-                    restorationColumn: 'id',
-                    offset:0.5,
-                    vue : vue,
-                });
-                header.init();
-            },0);
+            new Header({
+                el: "table",
+                column: column,
+                data: this.json_contents,
+                @if(isset($excepted))isCheckAllBox:false,@endif
+            }).init();
         },
         methods:{
             selectedColor(id,e){
@@ -234,21 +201,10 @@
                     });
                 }
             },
-            checkAll(e){
-                if (e.target.checked){
-                    this.json_contents.forEach((el,i)=>{
-                        if (this.checkData.indexOf(el.waybill_id) == '-1'){
-                            this.checkData.push(el.waybill_id);
-                        }
-                    });
-                }else {
-                    this.checkData = [];
-                }
-            },
             waybillExport(checkAllSign){
                 let url='{{url('waybillFinancialSnapshot/export')}}';
                 let token='{{ csrf_token() }}';
-                excelExport(checkAllSign,this.checkData,url,this.sum,token);
+                excelExport(checkAllSign,checkData,url,this.sum,token);
             },
         }
     })