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/Dispatch/Views/Stock/StockTakeList.aspx

178 lines
8.0 KiB
Plaintext

3 years ago
<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Dispatch/Views/Shared/MP.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Body" runat="server">
<link type="text/css" rel="stylesheet" href="/Areas/Dispatch/Content/MP/css/list.css" />
<div class="container" id="listwrap">
<div class="page form_page js_show">
<header class='demos-header'>
<h2 class="demos-title">
<img src="/Areas/Dispatch/Content/MP/img/stock_list.png" />库存列表</h2>
<a class="export" href="#" id="btnExport">
<img src="/Areas/Dispatch/Content/MP/img/export.png" />导出</a>
</header>
<div class="clearfix"></div>
<div class="weui-cells weui-cells_form">
<div class="weui-cell">
<div class="weui-cell__hd">
<label class="weui-label">提单号</label>
</div>
<div class="weui-cell__bd">
<input class="weui-input" type="text" id="condIptBLNO" placeholder="请输入提单号" />
</div>
</div>
<div class="weui-cell">
<div class="weui-cell__hd">
<label class="weui-label">合同号</label>
</div>
<div class="weui-cell__bd">
<input class="weui-input" type="text" id="condIptCONTRACTNO" placeholder="请输入合同号" />
</div>
</div>
<div class="weui-cell">
<div class="weui-cell__hd">
<label class="weui-label">品名</label>
</div>
<div class="weui-cell__bd">
<input class="weui-input" type="text" id="condIptGOODSNAME" placeholder="请输入品名" />
</div>
</div>
<div class="weui-cell">
<div class="weui-cell__hd">
<label class="weui-label">有货</label>
</div>
<div class="weui-cell__bd">
<select class="select" id="condSelSTOCK">
<option class="option" value="">全部</option>
<option class="option" value="1">有货</option>
<option class="option" value="2">无货</option>
</select>
</div>
</div>
</div>
<a class="weui-btn weui-btn_primary" id="btnQuery">查询</a>
<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="listContainer" id="listContainer">
<!--内容显示区域-->
</div>
<div class="weui-loadmore weui-loadmore_line" id="noMoreTip">
<span class="weui-loadmore__tips">没有更多数据</span>
</div>
</div>
</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;
var openid = '<%=ViewData["openid"].ToString()%>';
$(function () {
$(document).attr("title", "仓储信息查询");
loadData();
$("#listContainer", ".weui-form-preview").on('click',
function () {
alert("aaa");
}
);
$("#btnQuery").on('click', function () {
pageIndex = 0;
$("#listContainer").empty()
loadData()
var condObj = {};
condObj.blno = $("#condIptBLNO").val();
condObj.contractno = $("#condIptCONTRACTNO").val();
condObj.goodsname = $("#condIptGOODSNAME").val();
condObj.stockstatus = $("#condSelSTOCK").val();
$("#btnExport").attr("href", '<%=Url.Action("StockTakeExport")%>?openid=' + openid + '&condition=' + escape(JSON.stringify(condObj)))
})
$("#btnExport").attr("href", '<%=Url.Action("StockTakeExport")%>?openid=' + openid)
});
$("#listContainer").infinite().on("infinite", function () {
loadData();
});
function loadData() {
if (loading) return;
loading = true;
$("#loadingTip").show();
$("#noMoreTip").hide();
var condObj = {};
condObj.blno = $("#condIptBLNO").val();
condObj.contractno = $("#condIptCONTRACTNO").val();
condObj.goodsname = $("#condIptGOODSNAME").val();
condObj.stockstatus = $("#condSelSTOCK").val();
var len = $("#listContainer").children().length;
if (total == 0 || len < total) {
console.log(len + " " + total);
$.ajax({
type: "POST",
url: "/Dispatch/Stock/StockTakeListData",
data: { openid: openid, page: pageIndex + 1, pageSize: pageSize, condition: JSON.stringify(condObj) },
dataType: "json",
success: function (data) {
console.log("获取数据成功");
loading = false;
total = data.total;
pageIndex = data.page;
showList(data.list);
$("#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__bd">'
+ ' <div class="page__title">' + list[idx].GOODSNAME + '</div>'
+ ' <div class="page__title">提单号:' + list[idx].BLNO + '</div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">入库件数</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].hj_GOODSPACK + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">库存件数</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].hj_GOODSPACKSTOCK + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">未完税件数</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].WeiWanShui + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">可发货件数</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].KeFaHuo + '</span>'
+ ' </div>'
+ ' <div class="weui-form-preview__item">'
+ ' <label class="weui-form-preview__label">合同号</label>'
+ ' <span class="weui-form-preview__value">' + list[idx].CONTRACTNO + '</span>'
+ ' </div>'
+ '</div>'
$("#listContainer").append(html);
}
}
</script>
</asp:Content>