|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="XSDC.aspx.cs" Inherits="DSWeb.Areas.Mobile.Views.BookSpace.XSDC" %>
|
|
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
<head runat="server">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
<title></title>
|
|
|
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">
|
|
|
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
|
|
|
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
|
|
|
<script src="../../../../Areas/Mobile/Viewsjs/BookSpace/BookSpace.js" type="text/javascript"></script>
|
|
|
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
|
|
<script type="text/javascript">
|
|
|
//时间控件
|
|
|
$(function () {
|
|
|
var currYear = (new Date()).getFullYear();
|
|
|
var opt={};
|
|
|
opt.date = {preset : 'date'};
|
|
|
opt.datetime = {preset : 'datetime'};
|
|
|
opt.time = {preset : 'time'};
|
|
|
opt.default = {
|
|
|
theme: 'android-ics light', //皮肤样式
|
|
|
display: 'modal', //显示方式
|
|
|
mode: 'scroller', //日期选择模式
|
|
|
lang:'zh',
|
|
|
startYear:currYear - 10, //开始年份
|
|
|
endYear:currYear + 10 //结束年份
|
|
|
};
|
|
|
$("#etd").val('').scroller('destroy').scroller($.extend(opt['date'], opt['default']));
|
|
|
var optDateTime = $.extend(opt['datetime'], opt['default']);
|
|
|
var optTime = $.extend(opt['time'], opt['default']);
|
|
|
});
|
|
|
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div data-role="page" id="pageone">
|
|
|
<div data-role="content">
|
|
|
<h2>销售订舱</h2>
|
|
|
<form id="dataform">
|
|
|
<ul data-role="listview">
|
|
|
<li>
|
|
|
<label for="wtdw">
|
|
|
委托单位:</label>
|
|
|
<select name="wtdw" id="wtdw">
|
|
|
<%=_WTDWHTML %>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="dcdl">
|
|
|
订舱代理:</label>
|
|
|
<select name="dcdl" id="dcdl">
|
|
|
<%=_DCDLHTML %>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="etd">开船日期</label>
|
|
|
<input type="text" name="etd" id="etd" />
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="zhg">
|
|
|
装货港:</label>
|
|
|
<select name="zhg" id="zhg">
|
|
|
<%=_ZHGHTML %>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="xhg">
|
|
|
卸货港:</label>
|
|
|
<select name="xhg" id="xhg">
|
|
|
<%=_XHGHTML %>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="cgs">
|
|
|
船公司:</label>
|
|
|
<select name="cgs" id="cgs">
|
|
|
<%=_CGSHTML %>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="fffs">
|
|
|
付费方式:</label>
|
|
|
<select name="fffs" id="fffs">
|
|
|
<%=_FFFSHTML %>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="hwbs">
|
|
|
货物标示:</label>
|
|
|
<select name="hwbs" id="hwbs">
|
|
|
<option value="S">S普通货 </option>
|
|
|
<option value="R">R冻柜 </option>
|
|
|
<option value="D">D危险品 </option>
|
|
|
<option value="O">O超限箱 </option>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li id="lictn">集装箱信息: </li>
|
|
|
<li>
|
|
|
<label for="jianshu">
|
|
|
件数:</label>
|
|
|
<input type="number" name="jianshu" id="jianshu">
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="baozhuang">
|
|
|
包装:</label>
|
|
|
<select name="baozhuang" id="baozhuang">
|
|
|
<%=_BAOZHUANG %>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="zhongliang">
|
|
|
重量(KGS):</label>
|
|
|
<input type="number" name="zhongliang" id="zhongliang">
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="chima">
|
|
|
尺码(CBM):</label>
|
|
|
<input type="number" name="chima" id="chima">
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="kefu">
|
|
|
客服:</label>
|
|
|
<select name="kefu" id="kefu">
|
|
|
<%=_KEFU %>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="haiwaikefu">
|
|
|
海外客服:</label>
|
|
|
<select name="haiwaikefu" id="haiwaikefu">
|
|
|
<%=_HAIWAIKEFU %>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="caozuo">
|
|
|
操作:</label>
|
|
|
<select name="caozuo" id="caozuo">
|
|
|
<%=_CAOZUO %>
|
|
|
</select>
|
|
|
</li>
|
|
|
<li>
|
|
|
<label for="ordno">
|
|
|
订舱编号:</label>
|
|
|
<input type="text" readonly name="ordno" id="ordno" value="*" />
|
|
|
<input type="hidden" id="hdordno" name="hdordno" runat="server"/>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<br />
|
|
|
<br />
|
|
|
<br />
|
|
|
<br />
|
|
|
<br />
|
|
|
<br />
|
|
|
<input type="hidden" id="hdctntemp" name="hdctntemp" runat="server"/>
|
|
|
<input type="hidden" runat="server" id="action" name ="action"/>
|
|
|
</form>
|
|
|
</div>
|
|
|
<div data-role="footer" style="position: fixed; bottom: 0; width: 100%; z-index: 1000">
|
|
|
<div data-role="navbar" id="navbar">
|
|
|
<ul id="ulfoot">
|
|
|
<%=_FOOTERHTML %>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div data-role="page" id="pagetwo">
|
|
|
<div data-role="content">
|
|
|
<h2>
|
|
|
集装箱信息</h2>
|
|
|
<br />
|
|
|
<ul data-role="listview" id="ulJZX">
|
|
|
<%=_CTNREAD %>
|
|
|
</ul>
|
|
|
<div data-role="footer" style="position: fixed; left: 0px; bottom: 0; width: 100%;
|
|
|
z-index: 1000">
|
|
|
<div data-role="navbar" id="Div1">
|
|
|
<ul id="ul1">
|
|
|
<li><a data-icon="plus" id="addJZX">添加</a></li>
|
|
|
<li><a href="#pageone" data-icon="check" id="btnCtnOk">确认</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div data-role="page" id="pagethree">
|
|
|
<div data-role="header">
|
|
|
<h1>
|
|
|
提示!</h1>
|
|
|
</div>
|
|
|
<div data-role="content">
|
|
|
<p id="infop" style="color:Red;font-size:14px"></p>
|
|
|
</div>
|
|
|
<div data-role="footer" style="position: fixed; left: 0px; bottom: 0; width: 100%;
|
|
|
z-index: 1000">
|
|
|
<div data-role="navbar" id="Div2">
|
|
|
<ul id="ul2">
|
|
|
<li><a href="#" data-icon="check" id="btnAction">确认</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<input type="hidden" runat="server" id="hdJZXComboxHtml" />
|
|
|
<input type="hidden" runat="server" id="hdJZXShuliangComboxHtml" />
|
|
|
<input type="hidden" runat="server" id="hdJZXRead" />
|
|
|
|
|
|
<script>
|
|
|
$(document).ready(function () {
|
|
|
$("#addJZX").click(function () {
|
|
|
var jzxhtml = $("#hdJZXComboxHtml").val();
|
|
|
var jzxshulianghtml = $("#hdJZXShuliangComboxHtml").val();
|
|
|
$("#ulJZX").append("<li><div data-role=\"controlgroup\" data-type=\"horizontal\">"
|
|
|
+ jzxhtml + "" + jzxshulianghtml
|
|
|
+ "<a href=\"#\" id=\"delctn\" onclick=\"delctnclick(this)\" data-icon=\"minus\" data-role=\"button\">删除</a></div></li>").trigger("create");
|
|
|
$('#ulJZX').listview('refresh');
|
|
|
});
|
|
|
|
|
|
$("#btnCtnOk").click(function () {
|
|
|
reloadCTNHTML();
|
|
|
})
|
|
|
|
|
|
$("#btnSave").click(function () {
|
|
|
$("#action").val("0");
|
|
|
var formData = $("#dataform").serialize();
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Mobile/BookSpace/Save",
|
|
|
data: formData,
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
if (data.Data != "" && data.Data != null) {
|
|
|
$("#ordno").val(data.Data);
|
|
|
alert("保存成功");
|
|
|
} else {
|
|
|
alert("保存失败");
|
|
|
}
|
|
|
|
|
|
}, error: function (e) {
|
|
|
alert("保存失败");
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
|
|
|
$("#btnSubmit").click(function () {
|
|
|
$("#action").val("1");
|
|
|
var formData = $("#dataform").serialize();
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Mobile/BookSpace/Save",
|
|
|
data: formData,
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
if (data.Data != "" && data.Data != null) {
|
|
|
$("#odrno").val(data.Data);
|
|
|
$("#infop").html("提交成功");
|
|
|
} else {
|
|
|
$("#infop").html("提交失败");
|
|
|
}
|
|
|
|
|
|
}, error: function (e) {
|
|
|
$("#infop").html("操作失败");
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
|
|
|
$("#btnRevoke").click(function () {
|
|
|
var ordno = $("#ordno").val();
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Mobile/BookSpace/Revoke",
|
|
|
data: {
|
|
|
ordno: ordno
|
|
|
},
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
if (data.Success) {
|
|
|
$("#odrno").val(data.Data);
|
|
|
$("#infop").html("撤销成功");
|
|
|
} else {
|
|
|
$("#infop").html("撤销失败");
|
|
|
}
|
|
|
|
|
|
}, error: function (e) {
|
|
|
$("#infop").html("操作失败");
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
|
|
|
$("#btnCopy").click(function () {
|
|
|
var currurl = window.location.href;
|
|
|
currurl += '©=1';
|
|
|
window.location.href = currurl;
|
|
|
})
|
|
|
|
|
|
|
|
|
$("#btnAction").click(function () {
|
|
|
wx.closeWindow();
|
|
|
})
|
|
|
|
|
|
if ($("#hdctntemp").val() != "") {
|
|
|
var tempctn = $("#hdctntemp").val().substring(0, $("#hdctntemp").val().length - 1).split('/');
|
|
|
|
|
|
var ctnhtml = "集装箱信息<br/>";
|
|
|
for (var i = 0; i < tempctn.length; i++) {
|
|
|
ctnhtml += "箱型:" + tempctn[i].split('*')[0] + " 数量:" + tempctn[i].split('*')[1] + "<br/>";
|
|
|
}
|
|
|
$("#lictn").html(ctnhtml);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($("#hdordno").val() != "") {
|
|
|
$("#ordno").val($("#hdordno").val());
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
function delctnclick(o) {
|
|
|
$(o).parents('li')[0].remove();
|
|
|
}
|
|
|
|
|
|
function reloadCTNHTML() {
|
|
|
$("#hdctntemp").val('');
|
|
|
$("#ulJZX>li").each(function (i) {
|
|
|
var ul = $("#ulJZX");
|
|
|
//箱型
|
|
|
var ctn = $(ul).children()[i].children[0].children[0].children[0].children[0].children[1].value;
|
|
|
//数量
|
|
|
var shuliang = $(ul).children()[i].children[0].children[0].children[1].children[0].children[1].value;
|
|
|
if (ctn == "" || shuliang == "") {
|
|
|
return true;
|
|
|
}
|
|
|
var temp = $("#hdctntemp").val();
|
|
|
temp += ctn + '*' + shuliang + '/';
|
|
|
$("#hdctntemp").val(temp);
|
|
|
});
|
|
|
if ($("#hdctntemp").val() != "") {
|
|
|
var tempctn = $("#hdctntemp").val().substring(0, $("#hdctntemp").val().length - 1).split('/');
|
|
|
|
|
|
var ctnhtml = "集装箱信息<br/>";
|
|
|
for (var i = 0; i < tempctn.length; i++) {
|
|
|
ctnhtml += "箱型:" + tempctn[i].split('*')[0] + " 数量:" + tempctn[i].split('*')[1] + "<br/>";
|
|
|
}
|
|
|
$("#lictn").html(ctnhtml);
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|