You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Areas/MvcShipping/Views/MsOpSeaeRunBill/WxRunBillList.aspx

115 lines
5.0 KiB
Plaintext

<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/MvcShipping/Views/Shared/MP.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Body" runat="server">
<header class='demos-header'>
<h2 class="demos-title">跑单列表</h2>
</header>
<div class="weui-panel">
<div class="weui-panel__bd" id="listContainer">
</div>
</div>
<div class='demos-content-padded'>
<div class="weui-loadmore" id="loadingTip">
<i class="weui-loading"></i>
<span class="weui-loadmore__tips">正在加载</span>
</div>
<div class="weui-loadmore weui-loadmore_line" id="noMoreTip">
<span class="weui-loadmore__tips">没有更多数据</span>
</div>
</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FooterScript" runat="server">
<script>
var loading = false;
var pageIndex = 0;
var pageSize = 10;
var total = 0;
$(function () {
loadData();
});
$(document.body).infinite().on("infinite", function () {
loadData();
});
function loadData() {
if (loading) return;
loading = true;
$("#loadingTip").show();
$("#noMoreTip").hide();
var len = $("#listContainer").children().length;
if (total == 0 || len < total) {
$.ajax({
type: "POST",
url: "/MvcShipping/MsOpSeaeRunBill/GetDataList",
dataType: "json",
success: function (data) {
loading = false;
total = data.totalCount;
pageIndex = data.page;
showList(data.data);
$("#loadingTip").hide();
if (total == 0) {
$("#noMoreTip").show();
}
}
});
} else {
$("#loadingTip").hide();
$("#noMoreTip").show();
}
}
function showList(list) {
for (var idx = 0; idx < list.length; idx++) {
var html = '<div class="weui-form-preview" onclick="goDetail(\'' + list[idx].GID + '\')">'
+ '<div class="weui-form-preview__bd">'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">客户名称</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].CUSTOMERNAME + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">联系人</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].CHIEF + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">电话</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].TEL + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">地址</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].ADDR + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">跑单原因</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].REASON + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">跑单人</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].USERNAME + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">跑单时间</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].RUNTIME + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">状态</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].STATUS + '</span>'
+ ' </div>';
html += '</div>'
$("#listContainer").append(html);
}
}
function goDetail(gid) {
location.href = "/MvcShipping/MsOpSeaeRunBill/WxRunBillDetail?gid=" + gid;
}
</script>
</asp:Content>