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