lvhao 1 天之前
父节点
当前提交
2971092023
共有 1 个文件被更改,包括 13 次插入29 次删除
  1. 13 29
      template/erp/workshopshow_xdshow.html

+ 13 - 29
template/erp/workshopshow_xdshow.html

@@ -580,8 +580,8 @@ h2 {
 
         <!-- 3. 分页组件 (独立一行) -->
         <div class="pagination-section">
-            <a href="javascript:void(0);" id="syy" class="page-btn" data-type="1" onclick="getOrderList(this)">上一页</a>
-            <a href="javascript:void(0);" id="xyy" class="page-btn" data-type="2"  onclick="getOrderList(this)">下一页</a>
+            <a href="javascript:void(0);"  class="page-btn"  onclick="getShouYe()"> 首 页 </a>
+            <a href="javascript:void(0);"  class="page-btn"  onclick="getNextPage()">下一页</a>
         </div>
     </div>
 
@@ -730,46 +730,30 @@ h2 {
     }
 
     //美国备货订单列表
-    function mgbhorders(type = 0){
+    function mgbhorders(){
         $.post("/workshopshow/mgbhorders",{page:page},function(res){
             if(res.code == 1){
-                if(type == 1){
-                    page = page -1;
-                }else{
-                    page = page + 1;
-                }
+               
                 let tplStr = document.getElementById('edit_content').innerHTML;
                 //let outputHtml = compiledTemplate.fetch({ data: data });
                 let outputHtml =  ejs.render(tplStr, {data: res.data});
                 $("#bh_box").html(outputHtml);
             }else{
-                if(type == 1){
-                    page = page + 1;
-                }else{
-                    page = page - 1;
-                }
+               
                 layx.msg(res.msg,{dialogIcon:'warn', position:'cc'});
             }
         },'json')
     }
-    function getOrderList(that){
-        let type = $(that).data("type");
-        if(type == 1){
-            console.log("=================")
-            console.log(page)
-            let tmp_page = page - 1;
-            console.log("---------------------")
-            if(tmp_page <= 0){
-                layx.msg('已经是第一页了',{dialogIcon:'warn', position:'cc'});
-                return;
-            }
-           
 
-        }else{
-            
-        }
-        mgbhorders(type);
+    function getShouYe(){
+        page = 1;
+        mgbhorders();
     }
+    function getNextPage(){
+        page++;
+        mgbhorders();
+    }
+