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/WxRunBillDetail.aspx

197 lines
8.1 KiB
Plaintext

3 years ago
<%@ 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">
<%
string gid = ViewData["gid"].ToString();
%>
<header class='demos-header'>
<h2 class="demos-title">跑单详情</h2>
</header>
<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="iptCUSTOMERNAME" readonly />
</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="iptCHIEF" readonly />
</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="iptTEL" readonly />
</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="iptADDR" readonly />
</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="iptREASON" readonly />
</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="iptUSERNAME" readonly />
</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="iptRUNTIME" readonly />
</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="iptREMARK" readonly />
</div>
</div>
</div>
<header class='demos-header'>
<h2 class="demos-title">委托列表</h2>
</header>
<div class="weui-panel">
<div class="weui-panel__bd" id="listContainer">
</div>
<div class="weui-btn-area" id="divBtnAccept" style="display: none;">
<a class="weui-btn weui-btn_primary" href="javascript:void(0);" id="btnAccept">接单</a>
</div>
<div class="weui-btn-area" id="divBtnComplete" style="display: none;">
<a class="weui-btn weui-btn_primary" href="javascript:void(0);" id="btnComplete">完成</a>
</div>
<div class="weui-btn-area" id="divTransfer" style="display: none;">
<a class="weui-btn weui-btn_primary" href="/MvcShipping/MsOpSeaeRunBill/WxRunBillTransfer?gid=<%=gid %>">转单</a>
</div>
</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FooterScript" runat="server">
<%
string gid = ViewData["gid"].ToString();
%>
<script>
$(function () {
$.ajax({
type: "POST",
url: "/MvcShipping/MsOpSeaeRunBill/WxRunBillDetailData?gid=<%=gid %>",
dataType: "json",
success: function (data) {
if (data.Success) {
$("#iptCUSTOMERNAME").val(data.Bill.CUSTOMERNAME);
$("#iptCHIEF").val(data.Bill.CHIEF);
$("#iptTEL").val(data.Bill.TEL);
$("#iptADDR").val(data.Bill.ADDR);
$("#iptREASON").val(data.Bill.REASON);
$("#iptUSERNAME").val(data.Bill.USERNAME);
$("#iptRUNTIME").val(data.Bill.RUNTIME);
$("#iptREMARK").val(data.Bill.REMARK);
$("#listContainer").empty();
for (var idx = 0; idx < data.Items.length; idx++) {
var html = '<div class="weui-form-preview">'
+ ' <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">' + data.Items[idx].MBLNO + '</span>'
+ ' </div>'
+ ' </div>'
+ ' <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">' + data.Items[idx].CUSTOMERNAME + '</span>'
+ ' </div>'
+ ' </div>'
+ ' <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">' + data.Items[idx].VESSEL + '</span>'
+ ' </div>'
+ ' </div>'
+ ' <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">' + data.Items[idx].VOYNO + '</span>'
+ ' </div>'
+ ' </div>'
+ '</div>';
$("#listContainer").append(html);
}
if (data.IsDispatch) {
$("#divBtnAccept").show();
}
if (data.IsAccept) {
$("#divBtnComplete").show();
}
if (data.IsTransfer) {
$("#divTransfer").show();
}
}
}
});
$("#btnAccept").on('click', function () {
$.ajax({
type: "POST",
url: "/MvcShipping/MsOpSeaeRunBill/AcceptBill?strGID=<%=gid %>",
dataType: "json",
success: function (data) {
$.alert(data.Message, "提示", function () { location.reload(); });
}
});
});
$("#btnComplete").on('click', function () {
$.ajax({
type: "POST",
url: "/MvcShipping/MsOpSeaeRunBill/CompleteBill?strGID=<%=gid %>",
dataType: "json",
success: function (data) {
$.alert(data.Message, "提示", function () { location.reload(); });
}
});
});
});
</script>
</asp:Content>