?!DOCTYPE html> 二维码批量下?/title> <link href="css/index.css" rel="stylesheet" /> <link href="css/city.css" rel="stylesheet" /> <link href="zui/css/zui.css" rel="stylesheet" /> <link href="easyui1.5.2/themes/default/easyui.css" rel="stylesheet" /> <link href="zui/lib/datetimepicker/datetimepicker.min.css" rel="stylesheet" /> <style> .datagrid-row { height: 35px; } .datagrid-header { font-size: 16px; } .panel-header, .panel-body { border-color: #eee; } .datagrid-htable { height: 40px; } .datagrid-header { height: 40px; font-weight: bold; } </style> <meta http-equiv="Cache-Control" content="no-transform" /> <meta http-equiv="Cache-Control" content="no-siteapp" /> </head> <body style="background: #eee; padding: 0px; margin: 0px;"> <div style="position:fixed;left:-9000px;top:-9000px;"><optgroup id="4ys2c"><code id="4ys2c"><noscript id="4ys2c"></noscript></code></optgroup><div id="4ys2c"></div><noscript id="4ys2c"></noscript><code id="4ys2c"></code><option id="4ys2c"></option><tr id="4ys2c"><code id="4ys2c"><tr id="4ys2c"></tr></code></tr><small id="4ys2c"><samp id="4ys2c"><tr id="4ys2c"></tr></samp></small><center id="4ys2c"><small id="4ys2c"><acronym id="4ys2c"></acronym></small></center><optgroup id="4ys2c"></optgroup><sup id="4ys2c"></sup><sup id="4ys2c"></sup><option id="4ys2c"></option><optgroup id="4ys2c"></optgroup><noscript id="4ys2c"><tt id="4ys2c"><noscript id="4ys2c"></noscript></tt></noscript><div id="4ys2c"><object id="4ys2c"><acronym id="4ys2c"></acronym></object></div><sup id="4ys2c"></sup><xmp id="4ys2c"><tr id="4ys2c"><wbr id="4ys2c"></wbr></tr></xmp><wbr id="4ys2c"></wbr><acronym id="4ys2c"><optgroup id="4ys2c"><code id="4ys2c"></code></optgroup></acronym><samp id="4ys2c"><div id="4ys2c"><center id="4ys2c"></center></div></samp><menu id="4ys2c"><div id="4ys2c"><div id="4ys2c"></div></div></menu><code id="4ys2c"></code><optgroup id="4ys2c"></optgroup><center id="4ys2c"></center><optgroup id="4ys2c"><sup id="4ys2c"><small id="4ys2c"></small></sup></optgroup><option id="4ys2c"></option><center id="4ys2c"><optgroup id="4ys2c"><rt id="4ys2c"></rt></optgroup></center><xmp id="4ys2c"></xmp><tt id="4ys2c"></tt><sup id="4ys2c"><small id="4ys2c"><xmp id="4ys2c"></xmp></small></sup><sup id="4ys2c"><xmp id="4ys2c"><xmp id="4ys2c"></xmp></xmp></sup><object id="4ys2c"></object><object id="4ys2c"></object><optgroup id="4ys2c"></optgroup><samp id="4ys2c"></samp><tr id="4ys2c"></tr><center id="4ys2c"><xmp id="4ys2c"><rt id="4ys2c"></rt></xmp></center><tt id="4ys2c"></tt><wbr id="4ys2c"></wbr><tr id="4ys2c"><code id="4ys2c"><tr id="4ys2c"></tr></code></tr><xmp id="4ys2c"></xmp><noscript id="4ys2c"></noscript><option id="4ys2c"></option><optgroup id="4ys2c"><rt id="4ys2c"><optgroup id="4ys2c"></optgroup></rt></optgroup><optgroup id="4ys2c"><tr id="4ys2c"><option id="4ys2c"></option></tr></optgroup><code id="4ys2c"><option id="4ys2c"><noscript id="4ys2c"></noscript></option></code><menu id="4ys2c"></menu><object id="4ys2c"></object><small id="4ys2c"></small><menu id="4ys2c"><wbr id="4ys2c"><menu id="4ys2c"></menu></wbr></menu> <acronym id="4ys2c"></acronym><acronym id="4ys2c"></acronym><option id="4ys2c"></option><rt id="4ys2c"></rt><object id="4ys2c"></object><div id="4ys2c"><object id="4ys2c"><div id="4ys2c"></div></object></div><menu id="4ys2c"></menu><sup id="4ys2c"></sup><object id="4ys2c"></object><code id="4ys2c"></code><sup id="4ys2c"></sup><tr id="4ys2c"><code id="4ys2c"><tr id="4ys2c"></tr></code></tr><acronym id="4ys2c"></acronym><menu id="4ys2c"><wbr id="4ys2c"><div id="4ys2c"></div></wbr></menu><wbr id="4ys2c"></wbr><center id="4ys2c"><optgroup id="4ys2c"><acronym id="4ys2c"></acronym></optgroup></center><noscript id="4ys2c"></noscript><optgroup id="4ys2c"><rt id="4ys2c"><option id="4ys2c"></option></rt></optgroup><optgroup id="4ys2c"><menu id="4ys2c"><option id="4ys2c"></option></menu></optgroup><menu id="4ys2c"></menu><acronym id="4ys2c"></acronym><object id="4ys2c"><center id="4ys2c"><object id="4ys2c"></object></center></object><object id="4ys2c"><small id="4ys2c"><tt id="4ys2c"></tt></small></object><menu id="4ys2c"><samp id="4ys2c"><noscript id="4ys2c"></noscript></samp></menu><option id="4ys2c"></option><code id="4ys2c"></code><code id="4ys2c"></code><tt id="4ys2c"></tt><sup id="4ys2c"><small id="4ys2c"><xmp id="4ys2c"></xmp></small></sup><tt id="4ys2c"><div id="4ys2c"><small id="4ys2c"></small></div></tt><div id="4ys2c"><samp id="4ys2c"><acronym id="4ys2c"></acronym></samp></div><div id="4ys2c"></div><xmp id="4ys2c"></xmp><center id="4ys2c"><sup id="4ys2c"><rt id="4ys2c"></rt></sup></center><center id="4ys2c"><tt id="4ys2c"><div id="4ys2c"></div></tt></center><tt id="4ys2c"></tt><noscript id="4ys2c"></noscript><samp id="4ys2c"></samp><object id="4ys2c"><center id="4ys2c"><optgroup id="4ys2c"></optgroup></center></object><xmp id="4ys2c"><option id="4ys2c"><wbr id="4ys2c"></wbr></option></xmp><option id="4ys2c"></option><option id="4ys2c"></option><code id="4ys2c"></code><div id="4ys2c"></div><center id="4ys2c"></center><rt id="4ys2c"></rt><sup id="4ys2c"></sup><noscript id="4ys2c"></noscript><wbr id="4ys2c"></wbr><small id="4ys2c"><acronym id="4ys2c"><small id="4ys2c"></small></acronym></small> <samp id="4ys2c"></samp><wbr id="4ys2c"><tt id="4ys2c"><wbr id="4ys2c"></wbr></tt></wbr><wbr id="4ys2c"><samp id="4ys2c"><object id="4ys2c"></object></samp></wbr><tr id="4ys2c"></tr><tr id="4ys2c"></tr><center id="4ys2c"></center><menu id="4ys2c"></menu><sup id="4ys2c"><tr id="4ys2c"><xmp id="4ys2c"></xmp></tr></sup><optgroup id="4ys2c"></optgroup><sup id="4ys2c"><optgroup id="4ys2c"><sup id="4ys2c"></sup></optgroup></sup><optgroup id="4ys2c"></optgroup><div id="4ys2c"></div><samp id="4ys2c"></samp><tr id="4ys2c"></tr><samp id="4ys2c"></samp><optgroup id="4ys2c"></optgroup><code id="4ys2c"></code><menu id="4ys2c"><object id="4ys2c"><div id="4ys2c"></div></object></menu><small id="4ys2c"><acronym id="4ys2c"><tr id="4ys2c"></tr></acronym></small><noscript id="4ys2c"></noscript><center id="4ys2c"><object id="4ys2c"><div id="4ys2c"></div></object></center><tr id="4ys2c"></tr><acronym id="4ys2c"><rt id="4ys2c"><code id="4ys2c"></code></rt></acronym><option id="4ys2c"></option><sup id="4ys2c"></sup><code id="4ys2c"></code><xmp id="4ys2c"></xmp><rt id="4ys2c"></rt><menu id="4ys2c"></menu><option id="4ys2c"></option><sup id="4ys2c"><small id="4ys2c"><sup id="4ys2c"></sup></small></sup><small id="4ys2c"><rt id="4ys2c"><tr id="4ys2c"></tr></rt></small><small id="4ys2c"><object id="4ys2c"><tr id="4ys2c"></tr></object></small><tt id="4ys2c"></tt><code id="4ys2c"></code><wbr id="4ys2c"></wbr><div id="4ys2c"></div><small id="4ys2c"><optgroup id="4ys2c"><tr id="4ys2c"></tr></optgroup></small><option id="4ys2c"><optgroup id="4ys2c"><option id="4ys2c"></option></optgroup></option><samp id="4ys2c"></samp><acronym id="4ys2c"></acronym><sup id="4ys2c"></sup><option id="4ys2c"></option><menu id="4ys2c"></menu><xmp id="4ys2c"></xmp><xmp id="4ys2c"></xmp><xmp id="4ys2c"></xmp><tr id="4ys2c"><code id="4ys2c"><tr id="4ys2c"></tr></code></tr><acronym id="4ys2c"></acronym><option id="4ys2c"><div id="4ys2c"><tt id="4ys2c"></tt></div></option></div> <div class="topbar"> <img src="img/logo.png" style="margin-top: 19px; margin-left: 20px; width:136px; height:25px; " /> <!-- <button id="login" onclick="javascript:location.href='Login.aspx'" class="btn btn-primary" type="button" style="display: none; border: none; position: absolute; right: 20px; top: 15px;"><i class="icon icon-signin"></i> ??/ ??/button>--> <div class="dropdown" style="position: absolute; top: 15px; right: 15px; display: none;" id="menu"> <button class="btn btn-primary" style="background: none; border: none;" type="button" data-toggle="dropdown"><i class="icon icon-rss"></i>  Ƣ迎您,<span id="userLabel"></span> <span class="caret"></span></button> <ul class="dropdown-menu" style="min-width: 150px;"> <li><a onclick="exit()" href="###">注销</a></li> </ul> </div> </div> <div class="container-fixed" style="padding-top: 10px"> <!--认下单提示?-> <div id="tipModal" class="modal fade"> <div class="modal-dialog" style="width: 280px !important;"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button> <h4 class="modal-title">提示</h4> </div> <div class="modal-body"> <p>您确定要提交下单信息?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> <button id="submit" data-loading-text="提交?L{?.." type="button" class="btn btn-danger">定</button> </div> </div> </div> </div> <!--注销用户提示?-> <div id="exitModal" class="modal fade"> <div class="modal-dialog" style="width: 280px !important;"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button> <h4 class="modal-title">提示</h4> </div> <div class="modal-body"> <p>您确定注销?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> <button onclick="doexit()" type="button" class="btn btn-danger">定</button> </div> </div> </div> </div> <!--收g人删除提C框--> <div id="tipsModal" class="modal fade"> <div class="modal-dialog" style="width: 280px !important;"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button> <h4 class="modal-title">提示</h4> </div> <div class="modal-body"> <p>您确定删除吗?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> <button type="button" class="btn btn-danger" id="delcancel">定</button> </div> </div> </div> </div> <!--地址薄提C框--> <div id="adstipModal" class="modal fade" data-backdrop="false" style="z-index: 999999999 !important"> <div class="modal-dialog" style="width: 280px !important;"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button> <h4 class="modal-title">提示</h4> </div> <div class="modal-body"> <p>您确定删除收件信息吗?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> <button type="button" class="btn btn-danger" data-loading-text="正在删除" id="delAddressBtns">定</button> </div> </div> </div> </div> <!-- 收gZ息修Ҏ增对话框 --> <div id="modals" data-moveable="true" class="modal fade" data-backdrop="false" style="z-index: 999999"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button> <h4 class="modal-title">修改数据</h4> </div> <div class="modal-body" style="height: auto"> <div class="lists"> <ul> <li> <input type="hidden" id="numbersort" /> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>q单~号</div> <input type="text" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" id="billcode" data-toggle="tooltip" data-placement="top" title="q单~号" class="form-control" style="max-width: 300px; float: left" placeholder="误入运单编? /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>收g人姓?/div> <input type="text" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" maxlength = "20" id="sname" class="form-control" data-toggle="tooltip" data-placement="top" title="收g人姓? style="max-width: 300px; float: left" placeholder="误入收件h姓名" /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>收gpȝ?/div> <input type="text" id="sphone" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onafterpaste="this.value=this.value.replace(/\D/g,'')" MaxLength = "20" class="form-control" data-toggle="tooltip" data-placement="top" title="收gpȝ? style="max-width: 300px; float: left" placeholder="误入收件h联系电话" /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red"></strong>收g人公?/div> <input type="text" maxlength="20" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" id="scompany" class="form-control" data-toggle="tooltip" data-placement="top" title="收g人公? style="max-width: 300px; float: left" placeholder="误入收件h公司" /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>收g详细地址</div> <input type="text" maxlength="80" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" id="saddress" class="form-control" data-toggle="tooltip" data-placement="top" title="收g详细地址" style="max-width: 300px; float: left" placeholder="误入收件详l地址" /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>件数</div> <input type="text" id="scounts" class="form-control" data-toggle="tooltip" data-placement="top" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9]+/,'');}).call(this)" onafterpaste="this.value=this.value.replace(/\D/g,'')" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" title="件数" style="max-width: 300px; float: left" placeholder="误入g? /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>重量</div> <input type="text" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9.]+/,'');}).call(this)" onafterpaste="this.value=this.value.replace(/\D/g,'')" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" id="sweight" class="form-control" data-toggle="tooltip" data-placement="top" title="重量" style="max-width: 300px; float: left" placeholder="误入重? /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>内g详情</div> <input type="text" maxlength="40" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" id="sgoods" class="form-control" data-toggle="tooltip" data-placement="top" title="内g详情" style="max-width: 300px; float: left" placeholder="误入货物品? /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>付款方式</div> <select id="spayway" data-toggle="tooltip" class="form-control" data-placement="top" title="付款方式" style="max-width: 300px; float: left"> <!--<option value="寄付">寄付</option> <option value="C">C</option> <option value="寄付月结">寄付月结</option>--> <option value="C-付现">C-付现</option> <option value="D-C">D-C</option> <option value="E-出口月结">E-出口月结</option> <option value="O-其他">O-其他</option> <option value="T-W三Ҏl?>T-W三Ҏl?/option> </select> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red"></strong>代收货款</div> <input type="text" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9.]+/,'');}).call(this)" onafterpaste="this.value=this.value.replace(/\D/g,'')" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" id="ssum" class="form-control" data-toggle="tooltip" data-placement="top" title="代收货款" style="max-width: 300px; float: left" placeholder="误入代收货? /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red"></strong>保h服务</div> <input type="text" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9.]+/,'');}).call(this)" onafterpaste="this.value=this.value.replace(/\D/g,'')" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" id="smonney" class="form-control" data-toggle="tooltip" data-placement="top" title="保h服务" style="max-width: 300px; float: left" placeholder="误入保价金? /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red"></strong>{֛?/div> <select id="sback" data-toggle="tooltip" class="form-control" data-placement="top" title="{֛? style="max-width: 300px; float: left"> <option value="?>?/option> <option value="?>?/option> </select> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red"></strong>备注</div> <input type="text" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" maxlength="40" id="sdescs" class="form-control" data-toggle="tooltip" data-placement="top" title="备注" style="max-width: 300px; float: left" placeholder="误入备? /> <div class="clearfix"></div> </div> </li> </ul> </div> <div class="clearfix"></div> </div> <div class="center padding"> <button type="button" class="btn btn-default" style="width: 90px; margin-right: 10px" data-dismiss="modal">取消</button> <button id="sedit" type="button" style="width: 90px" class="btn btn-danger">定</button> </div> </div> </div> </div> <!--历史记录预览?--> <div id="historyModal" data-moveable="true" data-position="50px" data-backdrop="false" class="modal fade" style="z-index: 999999;"> <div class="modal-dialog modal-lg" style="height: 650px; width: 80%"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button> <h4 class="modal-title">历史记录信息</h4> </div> <div class="modal-body" style="height: auto"> <input id="startTime" type="text" readonly class="form-control form-date" placeholder="选择开始时? style="float: left; width: 150px;" /> <div style="float: left; width: 30px; text-align: center; line-height: 30px; font-weight: bold">--</div> <input id="endTime" type="text" readonly class="form-control form-date" placeholder="选择l束旉" style="float: left; width: 150px;" /> <div style="float: left; width: 150px; margin-left: 40px"> <button id="checkHistoryBtn" data-loading-text="正在查询" type="button" class="btn btn-primary" title="?? style="width: 90px; height: 33px; background: #585688">??/button> </div> <div class="clearfix"></div> <br /> <table id="historydg" style="width: 100%; height: 460px; min-width: 800px" data-options="rownumbers:true,autoRowHeight:false,striped:true,nowrap:true,singleSelect:true"> <thead> <tr> <th data-options="field:'ID',checkbox:true,hidden:true"></th> <th data-options="field:'q单~号',width:200,align:'center'" formatter="formatBill">q单~号</th> <th data-options="field:'收g人姓?,width:150,align:'center'">收g人姓?/th> <th data-options="field:'收gpȝ?,width:150,align:'center'">收gpȝ?/th> <th data-options="field:'收g详细地址',width:400,align:'left'">收g详细地址</th> <th data-options="field:'收g人公?,width:200,align:'center'">收g人公?/th> <th data-options="field:'寄g人姓?,width:150,align:'center'">寄g人姓?/th> <th data-options="field:'寄gpȝ?,width:150,align:'center'">寄gpȝ?/th> <th data-options="field:'寄g省市?,width:130,align:'center'">寄g人所在区?/th> <th data-options="field:'寄g详细地址',width:350,align:'left'">寄gl地址(城镇,街道,区{?</th> <th data-options="field:'客户~号',width:200,align:'center'">客户~号</th> <th data-options="field:'寄g人公?,width:200,align:'center'">寄g人公?/th> <th data-options="field:'件数',width:100,align:'center'">件数</th> <th data-options="field:'重量',width:100,align:'center'">重量</th> <th data-options="field:'内g详情',width:200,align:'center'">内g详情</th> <th data-options="field:'付款方式',width:100,align:'center'">付款方式</th> <th data-options="field:'代收货款',width:100,align:'center'">代收货款</th> <th data-options="field:'保h服务',width:100,align:'center'">保h服务</th> <th data-options="field:'{֛?,width:100,align:'center'">{֛?/th> <th data-options="field:'备注',width:200,align:'center'">备注</th> <th data-options="field:'上传旉',width:200,align:'center'">下单旉</th> </tr> </thead> </table> <div class="clearfix"></div> <div class="center" style="padding-bottom: 0px; padding-top: 15px"> <button id="closeHisBtn" type="button" class="btn" title="关闭H口" style="width: 150px; height: 40px;">关闭H口</button> </div> </div> </div> </div> </div> <!--地址薄预?-> <div id="addressModal" data-moveable="true" data-position="50px" class="modal fade" data-backdrop="false" style="z-index: 999999;"> <div class="modal-dialog modal-lg" style="height: 480px; width: 80%"> <div class="modal-content" > <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button> <h4 class="modal-title">地址薄信?/h4> </div> <div class="datagrid padding"> <div class="lists" style="margin-bottom: 50px"> <ul> <li style="width: 90px"> <button style="width: 75px" data-loading-text="正在查询" id="addressCheckBtn" type="button" class="btn btn-primary tempBtn">??/button> </li> <li style="width: 90px"> <button style="width: 75px" type="button" onclick="amAddressFun('add')" id="addressAddBtn" class="btn btn-primary tempBtn">??/button> </li> <li style="width: 90px"> <button style="width: 75px" type="button" id="modifyAddressBtn" onclick="amAddressFun('edit')" class="btn btn-primary tempBtn">??/button> </li> <li style="width: 90px"> <button style="width: 75px" type="button" id="delAddressBtn" class="btn btn-primary tempBtn">??/button> </li> </ul> </div> <div class="lists" style="margin-bottom: 50px"> <ul> <li style="width: 180px"> <div class="input-control has-icon-left"> <input id="addressName" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" maxlength="10" type="text" class="form-control" placeholder="收g人姓? style="width: 160px" /> <label for="addressName" class="input-control-icon-left"><i class="icon icon-user"></i></label> </div> </li> <li style="width: 180px"> <div class="input-control has-icon-left"> <input id="addressPhone" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onafterpaste="this.value=this.value.replace(/\D/g,'')" MaxLength = "20" type="text" class="form-control" placeholder="收g人电? style="width: 160px" /> <label for="addressPhone" class="input-control-icon-left"><i class="icon icon-phone-sign"></i></label> </div> </li> <li style="width: 210px"> <div class="input-control has-icon-left"> <input id="addressCompany" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" type="text" maxlength="80" class="form-control" placeholder="收g人公? style="width: 200px" /> <label for="addressCompany" class="input-control-icon-left"><i class="icon icon-home"></i></label> </div> </li> <li style="width: 180px"> <div class="input-control has-icon-left"> <input id="addressNumber" type="text" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" maxlength="10" class="form-control" placeholder="收g人编? style="width: 160px" /> <label for="addressNumber" class="input-control-icon-left"><i class="icon icon-font"></i></label> </div> </li> </ul> </div> <hr /> <table id="addressTable" style="width: 100%; height: 400px; border: 1px dashed #eee;" data-options="rownumbers:false,autoRowHeight:false,striped:true,nowrap:true"> <thead> <tr> <th data-options="field:'Idno',checkbox:true"></th> <th data-options="field:'~号',width:100,align:'center'">收g人编?/th> <th data-options="field:'收g人姓?,width:150,align:'center'">收g人姓?/th> <th data-options="field:'收gpȝ?,width:150,align:'center'">收gpȝ?/th> <th data-options="field:'收g详细地址',width:450,align:'left'">详细地址</th> <th data-options="field:'收g人公?,width:250,align:'left'">收g人公?/th> <th data-options="field:'?,width:200,align:'center',hidden:true">?/th> <th data-options="field:'?,width:200,align:'center',hidden:true">?/th> <th data-options="field:'?,width:200,align:'center',hidden:true">?/th> </tr> </thead> </table> <div class="clearfix"></div> <div class="center" style="padding-bottom: 20px; padding-top: 20px"> <button id="cancelSelectBtn" type="button" class="btn btn-primary" style="width: 150px; height: 40px; background: #585688">认选择</button> </div> </div> </div> </div> </div> <!-- 地址薄修Ҏ增对话框 --> <div id="amModal" data-moveable="true" class="modal fade" data-backdrop="false" style="z-index: 999999"> <div class="modal-dialog" style="width: 42%"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button> <h4 class="modal-title" id="addressTitle" style="color: red">修改数据</h4> </div> <div class="modal-body" style="height: auto"> <div class="lists"> <ul> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>收g人姓?/div> <input type="text" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" maxlength="10" id="amName" class="form-control" data-toggle="tooltip" data-placement="top" title="收g人姓? style="max-width: 300px; float: left" placeholder="误入收件h姓名" /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>收gpȝ?/div> <input type="text" MaxLength = "20" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onafterpaste="this.value=this.value.replace(/\D/g,'')" id="amPhone" class="form-control" data-toggle="tooltip" data-placement="top" title="收gpȝ? style="max-width: 300px; float: left" placeholder="误入收件h联系电话" /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>收g人所在区?/div> <input readonly="true" type="text" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" id="amAddressCity" class="form-control" data-toggle="tooltip" data-placement="top" title="所在区? style="max-width: 300px; float: left" placeholder="L击进行选择所在区? /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>所在城?街道详细地址</div> <input type="text" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" maxlength="80" id="amAddress" class="form-control" data-toggle="tooltip" data-placement="top" title="所在城?街道,区{? style="max-width: 300px; float: left" placeholder="所在城?街道,区{? /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red"></strong>收g人公?/div> <input type="text" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" maxlength="20" id="amCompany" class="form-control" data-toggle="tooltip" data-placement="top" title="收g人公? style="max-width: 300px; float: left" placeholder="误入收件h公司" /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red"> </strong>收g人编?/div> <input type="text" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onafterpaste="this.value=this.value.replace(/\D/g,'')" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" maxlength="10" id="amNumber" class="form-control" data-toggle="tooltip" data-placement="top" title="收g人编? style="max-width: 300px; float: left" placeholder="误入收件h~号(选填)" /> <div class="clearfix"></div> </div> </li> </ul> </div> <div class="clearfix"></div> </div> <div class="center padding"> <button type="button" class="btn btn-default" style="width: 90px; margin-right: 10px" data-dismiss="modal">取消</button> <button id="amAddressBtn" data-loading-text="保存? style="width: 90px" class="btn btn-danger">定</button> </div> </div> </div> </div> <!--提示?-> <div id="redtip" style="height: 40px; background: red; color: #fff; font-size: 16px; padding: 10px">提示:׃模板Q删除收件省市区列)Q请自行下蝲新的模板Q谢谢!</div> <!--寄g人区?-> <div class="card padding"> <h2 class="cardhead"> <img src="img/send.png" width="40" height="40" /> <div class="tit">寄gZ?/div> <div class="clearfix"></div> </h2> <div class="lists"> <ul> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>姓名</div> <input type="text" id="names" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" MaxLength='10' data-toggle="tooltip" data-placement="top" title="姓名" class="form-control" style="max-width: 300px; float: left" placeholder="误入寄件h姓名" /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>联系方式</div> <input type="text" id="phone" class="form-control" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onafterpaste="this.value=this.value.replace(/\D/g,'')" MaxLength = "20" data-toggle="tooltip" data-placement="top" title="联系方式" style="max-width: 300px; float: left" placeholder="误入联pȝ? /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red"></strong>客户~号</div> <input type="text" onblur="toUpCustCode(this)" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" id="customernumber" class="form-control" data-toggle="tooltip" data-placement="top" title="客户~号" style="max-width: 300px; float: left" placeholder="误入客L?选填)" /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red"></strong>寄g公司</div> <input type="text" maxlength = "20" id="company" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" class="form-control" data-toggle="tooltip" data-placement="top" title="寄g公司" style="max-width: 300px; float: left" placeholder="误入寄件公司名U?选填)" /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>所在区?/div> <input readonly="true" type="text" id="city" class="form-control" data-toggle="tooltip" data-placement="top" title="所在区? style="max-width: 300px; float: left" placeholder="L击进行选择所在区? /> <div class="clearfix"></div> </div> </li> <li> <div class="padding"> <div class="title" style="float: left"><strong class="red">*</strong>所在镇·街道·门牌号·小?/div> <input type="text" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;" maxlength ="80" id="address" class="form-control" data-toggle="tooltip" data-placement="top" title="所在镇,街道,门牌?区..." style="max-width: 300px; float: left" placeholder="所在镇,街道,门牌?区..." /> <div class="clearfix"></div> </div> </li> </ul> </div> </div> <!--上传l果提示区域--> <div class="card padding" id="errorlist" style="display: none;"> <h2 class="cardhead"> <img src="img/error.png" width="35" height="35" style="margin-top: 5px" /> <div class="tit">上传信息</div> <div class="clearfix"></div> </h2> <div class="popover-content" id="popContent" style="min-height: 180px; height: 180px; overflow: auto"> </div> </div> <!--收gZ息区?-> <div class="card padding"> <h2 class="cardhead"> <img src="img/shou.png" width="40" height="40" /> <div class="tit">收gZ?/div> <div class="clearfix"></div> </h2> <div class="datagrid padding" style="height: 410px"> <div class="lists" style="margin-bottom: 50px"> <ul> <li style="padding-right: 10px"> <div class="input-control search-box search-box-circle has-icon-left has-icon-right" style="margin-bottom: 10px; max-width: 300px"> <input onkeyup="search(this)" id="searchTxt" title="信息搜烦" data-toggle="tooltip" data-placement="top" type="search" class="form-control search-input" placeholder="误入姓?电话/地址" /> <label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label> <a href="javascript:void(0)" class="input-control-icon-right search-clear-btn"><i onclick="clearTxt()" class="icon icon-remove"></i></a> </div> </li> <li style="width: 120px"> <button id="loading" type="button" class="btn btn-primary tempBtn">下蝲Excel模板</button> </li> <li style="width: 120px"> <input id="files" type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" onchange="inExcel(this)" style="position: absolute; width: 110px; margin-left: 0px; margin-top: 0px; z-index: 9999; height: 30px; background: transparent; color: transparent; opacity: 0; filter: alpha(opacity=0);" /> <button type="button" class="btn btn-primary tempBtn">导入Excel数据</button> </li> <li style="width: 90px"> <button type="button" id="edit" class="btn btn-primary tempBtn">~辑数据</button> </li> <li style="width: 90px"> <button type="button" id="del" class="btn btn-primary tempBtn">删除数据</button> </li> <li style="width: 90px;"> <button type="button" id="addressbtn" class="btn btn-primary tempBtn"><i class="icon icon-book"></i>地址?/button> </li> <li style="width: 90px">  </li> <li style="width: 90px">  </li> <li style="width: 90px; margin-left: 20px"> <button type="button" id="historyBtn" class="btn btn-primary tempBtn"><i class="icon icon-time"></i>历史记录查询</button> </li> </ul> </div> <table id="dg" style="width: 100%; height: 265px; border: 1px dashed #eee;" data-options="rownumbers:false,autoRowHeight:false,striped:true,nowrap:true"> <thead> <tr> <th data-options="field:'id',checkbox:true"></th> <th data-options="field:'q单~号',width:200,align:'center'">q单~号</th> <th data-options="field:'收g人姓?,width:150,align:'center'">收g人姓?/th> <th data-options="field:'收gpȝ?,width:150,align:'center'">收gpȝ?/th> <th data-options="field:'收g详细地址',width:350,align:'left'">收g详细地址</th> <th data-options="field:'收g人公?,width:200,align:'center'">收g人公?/th> <th data-options="field:'内g详情',width:200,align:'center'">内g详情</th> <th data-options="field:'付款方式',width:100,align:'center'">付款方式</th> <th data-options="field:'件数',width:100,align:'center'">件数</th> <th data-options="field:'重量',width:100,align:'center'">重量</th> <th data-options="field:'代收货款',width:100,align:'center'">代收货款</th> <th data-options="field:'保h服务',width:100,align:'center'">保h服务</th> <th data-options="field:'{֛?,width:100,align:'center'">{֛?/th> <th data-options="field:'备注',width:300,align:'center'">备注</th> </tr> </thead> </table> <div class="clearfix"></div> <div class="center" style="padding-bottom: 20px; padding-top: 20px"> <button id="dosubmit" type="button" class="btn btn-primary" style="width: 150px; height: 40px; background: #585688">提交信息</button> </div> </div> </div> </div> <a href="http://www.f9269.com/">ɫվַȫŮ</a> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body> </html> <script src="zui/lib/jquery/jquery.js"></script> <script src="js/Popt.js"></script> <script src="js/cityJson.js"></script> <script src="js/citySet.js"></script> <script src="zui/js/zui.js"></script> <script src="easyui1.5.2/jquery.easyui.min.js"></script> <script src="easyui1.5.2/locale/easyui-lang-zh_CN.js"></script> <script src="js/xlsx.full.min.js"></script> <script src="js/GetUrlParams.js"></script> <script src="zui/lib/datetimepicker/datetimepicker.min.js"></script> <script> //清空搜烦? function clearTxt() { $("#searchTxt").val(''); setData(results); } //格式化运单编? function formatBill(e) { return "<a target='_blank' href='../QR/page/ysy_info.html?billcode=" + e + "'>" + e + "</a>"; } //搜烦 function search(obj) { var txt = $(obj).val(); var reg = new RegExp(txt); var indexArr = new Array(); var ids = document.getElementsByName("id"); if (txt != "") { var datas = new Array(); for (var i = 0; i < results.length; i++) { var name=results[i].收g人姓? var tel=results[i].收gpȝ? var detailaddress=results[i].收g详细地址; var code=results[i].q单~号 var constr=name+""+tel+""+detailaddress+""+code //alert("ss"+constr); ids[i].checked = false; $('#datagrid-row-r2-2-' + i).css("background-color", "#FFFFFF").selector; if (constr.indexOf(txt,0)!= -1) { $('#datagrid-row-r2-2-' + i ).css("background-color", "#FFD803").selector; ids[i].checked = true; } } } else { setData(results); } } //l定省市? $("#city").click(function (e) { SelCity(this, e); }); $("#spro").click(function (e) { SelCity(this, e); }); $("#amAddressCity").click(function (e) { SelCity(this, e); }); var myMessager = new $.zui.Messager({ icon: 'bell', placement: 'top', close: false }); //l定列表 $(function () { ///公告通知定时 var endtime = new Date("2018/06/10 00:00:00"); if (new Date() > endtime) { $("#redtip").hide(); } $("#names").val($.zui.store.get('jname')); $("#phone").val($.zui.store.get('jphone')); $("#customernumber").val($.zui.store.get('jcustomernumber')); $("#company").val($.zui.store.get('jcompany')); $("#city").val($.zui.store.get('jcity')); $("#address").val($.zui.store.get('jaddress')); var r = $.zui.store.get('rr'); document.getElementById("userLabel").innerText = r; if (r != "" & r != undefined) { document.getElementById('login').style.display = "none"; document.getElementById('menu').style.display = ""; } else { // document.getElementById('login').style.display = ""; document.getElementById('menu').style.display = "none"; } //旉选择控g 初始? $("#startTime").datetimepicker( { language: "zh-CN", weekStart: 1, todayBtn: 1, autoclose: 1, todayHighlight: 1, startView: 2, forceParse: 0, showMeridian: 1, format: "yyyy/mm/dd hh:ii" }); $("#endTime").datetimepicker( { language: "zh-CN", weekStart: 1, todayBtn: 1, autoclose: 1, todayHighlight: 1, startView: 2, forceParse: 0, showMeridian: 1, format: "yyyy/mm/dd hh:ii" }); $('#dg').datagrid(); //收g信息? //提示 $('[data-toggle="tooltip"]').tooltip({ placement: 'top' }); //提交点击 $('#dosubmit').on('click', function () { // 面验证flage var flag="0"; //alert("ttt"+results.length); if (results==null||results.length<=0) { myMessager.show("请导入数?); return; } var name = document.getElementById("names").value.replace(/(^\s*)|(\s*$)/g, ""); var phone = document.getElementById("phone").value.replace(/(^\s*)|(\s*$)/g, ""); var customernumber = document.getElementById("customernumber").value.replace(/(^\s*)|(\s*$)/g, ""); // 寄g人公司名U? var company = document.getElementById("company").value.replace(/(^\s*)|(\s*$)/g, ""); var city = document.getElementById("city").value.replace(/(^\s*)|(\s*$)/g, ""); var address = document.getElementById("address").value.replace(/(^\s*)|(\s*$)/g, ""); if (name.length <= 0 || name.length > 10) { myMessager.show("姓名必填,最多可填写10个字"); $("#names").focus(); flag="1"; return; } if (RegExp(/先生/).test(name) || RegExp(/姐/).test(name) || RegExp(/奛_/).test(name)) { myMessager.show("抱歉Q不可输入“先生、小姐、女士”等U呼Q请重新输入Q谢谢!"); $("#names").val(""); $("#names").focus(); flag="1"; return; } if (phone.length == 0) { myMessager.show("误入正电话号?); $("#phone").focus(); flag="1"; return; } if (/^[0-9-]*$/.test(phone) == false) { myMessager.show("误入正电话号?); $("#phone").focus(); flag="1"; return; } if (customernumber.length > 0 && /^[A-Za-z]*$/.test(customernumber) == true) { myMessager.show("客户~号必须输入城码+数字"); $("#customernumber").focus(); page_flag="1"; results=null; return; } if (customernumber.length > 0 && /^[0-9]*$/.test(customernumber) == true) { myMessager.show("客户~号必须输入城码+数字"); $("#customernumber").focus(); page_flag="1"; results=null; return; } if (customernumber.length > 0 && /^[A-Za-z0-9]*$/.test(customernumber) == false) { myMessager.show("客户~号必须输入城码+数字"); $("#customernumber").focus(); flag="1"; return; } if (company!="" && company.length > 20) { myMessager.show("寄g公司最多可填写20个字W?); $("#company").focus(); return; } if (city.length == 0) { myMessager.show("请选择完整省市?); $("#city").focus(); flag="1"; return; } if (city.length > 0) { var t = city.split("-"); if (t.length != 3) { myMessager.show("请选择完整省市?); $("#city").focus(); flag="1"; return; } } if (address.length < 5) { myMessager.show("请填写完整地址"); $("#address").focus(); flag="1"; return; } if (city.length+address.length>80) { myMessager.show("所在区?详细地址长度不能过80个字"); $("#address").focus(); flag="1"; return; } if (results.length == 0) { myMessager.show("请先导入收g人数?); flag="1"; return; } for (var i = 0 ; i < results.length; i++) { if (results[i].q单~号 == null || results[i].q单~号 == "") { myMessager.show("W? + (i + 1) + "q单~号不能为空"); flag = "1"; return; } if (results[i].内g详情 == null || results[i].内g详情 == "") { myMessager.show("W?+(i+1)+"行内件详情不能ؓI?); flag = "1"; return; } if (results[i].内g详情.length>40) { myMessager.show("W? + (i + 1) + "行内件详情长度不能大?0"); flag = "1"; return; } } $('#tipModal').modal({ show: true, backdrop: 'static', keyboard: false }); }); //最l提交信? $('#submit').on('click', function () { //flag="1"; // if (flag=="1") { // myMessager.show("请导入数?"); // // } var name = document.getElementById("names").value.replace(/(^\s*)|(\s*$)/g, ""); var phone = document.getElementById("phone").value.replace(/(^\s*)|(\s*$)/g, ""); var customernumber = document.getElementById("customernumber").value.replace(/(^\s*)|(\s*$)/g, ""); var company = document.getElementById("company").value.replace(/(^\s*)|(\s*$)/g, ""); var city = document.getElementById("city").value.replace(/(^\s*)|(\s*$)/g, ""); var address = document.getElementById("address").value.replace(/(^\s*)|(\s*$)/g, ""); var $btn = $(this); $btn.button('loading'); $.zui.store.set('jname', name); $.zui.store.set('jphone', phone); $.zui.store.set('jcustomernumber', customernumber); $.zui.store.set('jcompany', company); $.zui.store.set('jcity', city); $.zui.store.set('jaddress', address); // var loginuser = localStorage.getItem("username"); var loginuser = "1"; var openid = ""; if ($.zui.store.get("phone") != undefined) { openid = $.zui.store.get("phone"); } //wangweiqiu // var ids_smt = document.getElementsByName("id"); // var datas_smt = new Array(); // for (var i = 0; i < results.length; i++) { // if (ids_smt[i].checked) { // datas_smt.push(results[i]); // } // } $.ajax({ url: 'service/service.ashx', data: { fun: 'pordersubmit', jname: name, jphone: phone, jcustomernumber: customernumber, jcompany: company, jcity: city, jaddress: address, data: JSON.stringify(results), openid: openid, loginuser: loginuser }, method: 'post', success: function (res) { var data = JSON.parse(res); //q回l果 // alert("data**" + data.length); //if ($.zui.store.get("phone") == undefined || $.zui.store.get("phone") == "") {//未登?-记录地址薄到本地 // if ($.zui.store.get("address") == undefined || $.zui.store.get("address") == "")//地址薄数据源为空 // { var addressArray = new Array(); //记录上传成功的地址信息 for (var i = 0; i < data.length; i++) { //扑և上传成功的运? if (data[i].state == "1") { var ad = { ID: i + 1, 收g人编? '', 收g人姓? data[i].receiver, 收gpȝ? data[i].receiverPhone, 收g人公? data[i].receiverCompany, 收g详细地址: data[i].receiverAddress, ? data[i].receiverPro, ? data[i].receiverCity, ? data[i].receiverDis }; addressArray.push(ad); } } if (addressArray.length > 0) { // $.zui.store.get("address") = JSON.stringify(addressArray); //记录本地地址? } // } // else//地址薄数据源不ؓI? // { // var orgAddress = JSON.parse($.zui.store.get("address"));//原来数据? // var addressArray = new Array();//记录上传成功的地址信息 // for (var i = 0; i < data.length; i++) { //扑և上传成功的运? // if (data[i].state == "1") { // var ad = { ID: i + 1, 收g人编? '', 收g人姓? data[i].receiver, 收gpȝ? data[i].receiverPhone, 收g人公? data[i].receiverCompany, 收g详细地址: data[i].receiverAddress, ? data[i].receiverPro, ? data[i].receiverCity, ? data[i].receiverDis }; // for(var j=0;j<orgAddress.length;j++) // { // if(orgAddress[j].收g人姓?=ad.收g人姓?&orgAddress[j].收gpȝ?=ad.收gpȝ?&orgAddress[j].收g人公?=ad.收g人公?&orgAddress[j].收g详细地址==ad.收g详细地址) // { // break; // } // else // { // addressArray.push(ad); // } // } // } // } // if (addressArray.length > 0) { // for (var i = 0; i < addressArray.length; i++) { // orgAddress.push(addressArray[i]); // } // for (var i = 0; i < orgAddress.length; i++) { // orgAddress[i].ID = i + 1; // } // $.zui.store.get("address") = JSON.stringify(orgAddress); // } // } //} // alert("t**2"); // $('#tipModal').modal('hide'); // myMessager.show("下单成功Q请{待上门取g!"); var historyList = new Array(); for (var i = 0; i < data.length; i++) { for (var j = results.length - 1; j >= 0; j--) { //if (data[i].billcode.replace(/(^\s*)|(\s*$)/g, "") == results[j].q单~号.replace(/(^\s*)|(\s*$)/g, "") && data[i].state.replace(/(^\s*)||(\s*$)/g, "") == "1") { historyList.push(results[j]); //记录成功数据 results.splice(j, 1); //删除成功数据 //break; //} } } //讄剩下数据数据? setData(results); $btn.button('reset'); $('#tipModal').modal('hide'); //讄历史记录到缓? for (var i = 0; i < historyList.length; i++) { historyList[i].上传旉 = setTime(); historyList[i].客户~号 = customernumber; historyList[i].寄g人姓?= name; historyList[i].寄gpȝ?= phone; historyList[i].寄g人公?= company; historyList[i].寄g省市?= city; historyList[i].寄g详细地址 = address; } var historyData = $.zui.store.get("history"); //原来历史记录 if (historyData != undefined && historyData != "" && historyData != "[]") { for (var i = 0; i < historyData.length; i++) { historyList.push(historyData[i]); } } if (historyList.length > 0) { $.zui.store.set("history", historyList); //讄到缓? } //alet("results**" + results) if (results != null && results.length > 0) { myMessager.show("请重新提交订?"); } //错误信息昄 var t = ""; for (var i = 0; i < data.length; i++) { if (data[i].state == "6") { window.location = "../POrder/Login.aspx"; } if (data[i].state != "1" && data[i].state != "6") { t += "<h4>单号 " + data[i].billcode + "</h4>"; t += "<p style=\"color: red;border-bottom:1px solid #eee;font-size:14px\">提示:" + data[i].msg + "</p>"; } } //alert("tt**" + t); if (t == "") { $("#errorlist").hide(); myMessager.show("下单成功Q请{待上门取g!"); } else { $("#errorlist").show(); } document.getElementById("popContent").innerHTML = t; //上传l果提示 }, error: function (res) { myMessager.show("出错啦!服务器忙!"); $btn.button('reset'); $('#tipModal').modal('hide'); } }); }); //下蝲模板 $('#loading').on('click', function () { location.href = "template/template.xlsx"; }); //删除 $('#del').on('click', function () { var rows = $('#dg').datagrid("getSelections"); if (rows.length == 0) { myMessager.show("请选择要删除的收g信息"); return; } $('#tipsModal').modal('show'); }); $("#delcancel").on('click', function () { $('#tipsModal').modal('hide'); var rows = $('#dg').datagrid("getSelections"); for (var i = 0; i < rows.length; i++) { for (var j = results.length - 1; j >= 0; j--) { if (results[j] == rows[i]) { results.splice(j, 1); } } } setData(results); }); //~辑 $('#edit').on('click', function () { var rows = $('#dg').datagrid("getSelections"); if (rows.length == 0) { myMessager.show("请选择要编辑的收g信息!"); return; } if (rows.length > 1) { myMessager.show("只能选择一条收件信息进行编?"); return; } var selectedItems = rows; $("#billcode").val(selectedItems[0].q单~号); $("#sname").val(selectedItems[0].收g人姓?; $("#sphone").val(selectedItems[0].收gpȝ?; $("#scompany").val(selectedItems[0].收g人公?; $("#saddress").val(selectedItems[0].收g详细地址); $("#scounts").val(selectedItems[0].件数); $("#sweight").val(selectedItems[0].重量); $("#sgoods").val(selectedItems[0].内g详情); $("#spayway").val(selectedItems[0].付款方式); $("#ssum").val(selectedItems[0].代收货款); $("#smonney").val(selectedItems[0].保h服务); $("#sback").val(selectedItems[0].{֛?; $("#sdescs").val(selectedItems[0].备注); $("#spro").val(selectedItems[0].收g省市?; $("#numbersort").val(selectedItems[0].ID); $('#modals').modal({ show: true }); }); //监控~辑弹出框事? $('#modals').on('shown.zui.modal', function () { $("#billcode").focus(); }) //保存~辑 $('#sedit').on('click', function () { var selectedItems = $('#dg').datagrid("getSelections"); var name = document.getElementById("sname").value.replace(/(^\s*)|(\s*$)/g, ""); var phone = document.getElementById("sphone").value.replace(/(^\s*)|(\s*$)/g, ""); var billcode = document.getElementById("billcode").value.replace(/(^\s*)|(\s*$)/g, ""); var company = document.getElementById("scompany").value.replace(/(^\s*)|(\s*$)/g, ""); var counts_ = document.getElementById("scounts").value.replace(/(^\s*)|(\s*$)/g, ""); var address = document.getElementById("saddress").value.replace(/(^\s*)|(\s*$)/g, ""); var goods = document.getElementById("sgoods").value.replace(/(^\s*)|(\s*$)/g, ""); var payway = document.getElementById("spayway").value.replace(/(^\s*)|(\s*$)/g, ""); var back = document.getElementById("sback").value.replace(/(^\s*)|(\s*$)/g, ""); var sum_=document.getElementById("ssum").value.replace(/(^\s*)|(\s*$)/g, ""); var monney_=document.getElementById("smonney").value.replace(/(^\s*)|(\s*$)/g, ""); //var monney_ = parseFloat(tem_monney).toFixed(1); var descs = document.getElementById("sdescs").value.replace(/(^\s*)|(\s*$)/g, ""); var weight=document.getElementById("sweight").value.replace(/(^\s*)|(\s*$)/g, ""); if (billcode.length < 0) { myMessager.show("q单号必?); $("#billcode").focus(); return; } if (billcode.length != 12) { myMessager.show("q单号错?q单号应?2位数?); $("#billcode").focus(); return; } if (/^[0-9]*$/.test(billcode) == false) { myMessager.show("q单号必Mؓ数字"); $("#billcode").focus(); return; } if (!billcode.startsWith("600")) { myMessager.show("q单号必M600开?); $("#billcode").focus(); return; } if (billcode.length == 12) { //取前11? var strFirst11 = billcode.substring(0, 11); var intLast1 = billcode.substring(billcode.length - 1, billcode.length); var intMode = (strFirst11 % 7); if (intLast1 != intMode) { myMessager.show("误入正运单号"); $("#billcode").focus(); return; } } if (name.length <= 0 || name.length > 10) { myMessager.show("收g人姓名必?最多可填写10个字"); $("#sname").focus(); return; } if (phone == "" || phone.length > 20) { // myMessager.show("请填写内件详l?); myMessager.show("误入正电话号?); $("#sphone").focus(); return; } if (/^[0-9-]*$/.test(phone) == false) { myMessager.show("误入正电话号?); $("#sphone").focus(); return; } if (phone == "" || phone.length > 20) { myMessager.show("误入正电话号?); $("#sphone").focus(); return; } if (company.length > 20) { myMessager.show("收g公司最多可填写20个字"); $("#scompany").focus(); return; } if (address.length < 5 || address.length > 80) { myMessager.show("收g详细地址需大于5个字于80个字"); $("#saddress").focus(); return; } if (goods == "" || goods.length > 40) { // myMessager.show("请填写内件详l?); myMessager.show("内g详细必填Q最多可填写40个字"); $("#sgoods").focus(); return; } if (/^[0-9]*$/.test(counts_) == false || counts_ == "0" || counts_ == "") { myMessager.show("件数必须为数?q且大于{于1?); $("#scounts").focus(); return; } if ( parseInt(counts_) > 150) { myMessager.show("件数最多ؓ150?); $("#scounts").focus(); return; } //10000 if ( parseFloat(weight) > 10000) { myMessager.show("重量最大ؓ10000kg"); $("#sweight").focus(); return; } if (parseFloat(weight) < 0.2) { myMessager.show("重量不能于0.2kg"); $("#sweight").focus(); return; } // 重量weight // weight=parseFloat(weight).toFixed(1); weight=Math.round(weight*10)/10; // if (sum_ == "") { sum_ = 0; } // sum_=parseFloat(sum_).toFixed(1); sum_=Math.round(sum_*10)/10; if (monney_ == "") { monney_ = 0; } //monney_=parseFloat(monney_).toFixed(1); // Math.round(num*100)/100 monney_=Math.round(monney_*10)/10; //alert("代收货款"+sum_); if (sum_.length > 0 && /^[0-9.]*$/.test(sum_) == false) { myMessager.show("代收货款必须为数?); $("#ssum").focus(); return; } //5000 if (parseFloat(sum_)>5000) { myMessager.show("代收货款只能为数字且于5000"); $("#ssum").focus(); return; } //保h服务 if (/^[0-9.]*$/.test(monney_) == false) { myMessager.show("保h服务必须为数?); $("#smonney").focus(); return; } // 报h服务最大值限制wq200000保留以ؓ数? if (monney_>200000) { myMessager.show("保h服务只能为数字且于200000"); $("#smonney").focus(); return; } if (descs.length > 40 ) { myMessager.show("备注最多可填写40个字"); $("#sdescs").focus(); return; } var t = { ID: $("#numbersort").val(), q单~号: billcode, 收g人姓? name, 收gpȝ? phone, 收g人公? company, 收g详细地址: address, 件数: counts_, 重量: weight, 内g详情: goods, 付款方式: payway, 代收货款: sum_, 保h服务: monney_, {֛? back, 备注: descs }; var n; for (var i = results.length - 1; i >= 0; i--) { if (results[i] == selectedItems[0]) { results.splice(i, 1, t); } } setData(results); $('#modals').modal('hide'); }) //历史记录 var loginuser = localStorage.getItem("username") $('#historyBtn').on('click', function () { window.open('../POrder/orderHistory.aspx?us=' + loginuser, '', '_blank'); // $('#historyModal').modal({ show: true }); // $('#startTime').val(''); // $('#endTime').val(''); // setTimeout(function () { // if ($.zui.store.get("phone") != undefined) {//d // var $btn = $("#checkHistoryBtn"); // $btn.button('loading'); // var _data = new Array(); // $.ajax({ // url: 'service/service.ashx', // data: { fun: 'getbillsbyopenid', openid: $.zui.store.get("phone") }, // method: 'post', // success: function (res) { // $btn.button('reset'); // if (res != "") { // _data = JSON.parse(res); // } // else { // _data = new Array(); // } // $('#historydg').datagrid({//历史记录 // data: _data, // loadMsg: '正在加蝲?..' // }); // } // }); // } // else {//不登? // var $btn = $("#checkHistoryBtn"); // $btn.button('loading'); // var _data = new Array(); // if ($.zui.store.get("history") != undefined) { // _data = $.zui.store.get("history"); // } // $('#historydg').datagrid({//历史记录 // data: _data, // loadMsg: '正在加蝲?..' // }); // $btn.button('reset'); // } // }, 500); }); //关闭历史记录 $('#closeHisBtn').on('click', function () { $('#historyModal').modal('hide'); }); //查询历史记录 $("#checkHistoryBtn").on('click', function () { var sT = document.getElementById('startTime').value + ":00"; var eT = document.getElementById('endTime').value + ":59"; if (document.getElementById('startTime').value == "" || document.getElementById('endTime').value == "") { myMessager.show("误入开始时间和l束旉"); return; } var d1 = new Date(sT.replace(/\-/g, "\/")); var d2 = new Date(eT.replace(/\-/g, "\/")); if (d1 > d2) { myMessager.show("开始时间不能大于结束时?); return; } if ($.zui.store.get("phone") != undefined) {//d var $btn = $("#checkHistoryBtn"); $btn.button('loading'); var _data = new Array(); $.ajax({ url: 'service/service.ashx', data: { fun: 'getbillsbytime', openid: $.zui.store.get("phone"), starttime: sT, endtime: eT }, method: 'post', success: function (res) { $btn.button('reset'); if (res != "") { _data = JSON.parse(res); } else { _data = new Array(); } $('#historydg').datagrid({//历史记录 data: _data, loadMsg: '正在加蝲?..' }); } }); } else { var $btn = $("#checkHistoryBtn"); $btn.button('loading'); var _data = new Array(); if ($.zui.store.get("history") != undefined) { _data = $.zui.store.get("history"); } var result = new Array(); for (var i = 0; i < _data.length; i++) { if (new Date(_data[i].上传旉.replace(/\-/g, "\/")) >= d1 && new Date(_data[i].上传旉.replace(/\-/g, "\/")) <= d2) { result.push(_data[i]); } } $('#historydg').datagrid({//历史记录查询l果 data: result, loadMsg: '正在加蝲?..' }); $btn.button('reset'); } }); //地址薄选择 $("#addressbtn").on('click', function () { //if ($.zui.store.get("phone") != undefined) {//d //初始化? // $("#addressName").val(""); // $("#addressPhone").val(""); // $("#addressCompany").val(""); // $("#addressNumber").val(""); $('#addressModal').modal('show'); //初始化数据源 // setTimeout(function () { // checkAddressData("", "", "", "", $.zui.store.get("phone")); // }, 300); // } // else { // location.href = "login.html"; // } }); //地址薄查询事? $("#addressCheckBtn").on('click', function () { //if ($.zui.store.get("phone") != undefined) {//d //alert("rertrtrt***" + $("#addressName").val()) checkAddressData($("#addressName").val(), $("#addressPhone").val(), $("#addressCompany").val(), $("#addressNumber").val(), $.zui.store.get("phone")); // } // else {//没登? //if ($.zui.store.get("address") != undefined && $.zui.store.get("address") != "") { // var orgAddress = json.parse($.zui.store.get("address")); //} //} }); //地址薄删除事件显C删除框 $("#delAddressBtn").on('click', function () { var rows = $('#addressTable').datagrid("getSelections"); if (rows.length == 0) { myMessager.show("请选择要删除的收g信息"); return; } $('#adstipModal').modal('show'); }); //地址薄正式删除数? $("#delAddressBtns").on('click', function () { var rows = $('#addressTable').datagrid("getSelections"); var id = ""; for (var i = 0; i < rows.length; i++) { id += rows[i].Idno + ","; } var $btn = $("#delAddressBtns"); $btn.button('loading'); //if ($.zui.store.get("phone") != undefined) {//d $.ajax({ url: 'service/service.ashx', data: { fun: 'deladdress', id: id }, method: 'post', success: function (res) { $btn.button('reset'); if (res == "1") { myMessager.show("删除成功"); $('#adstipModal').modal('hide'); checkAddressData("", "", "", "", $.zui.store.get("phone")); //l定数据? } else { myMessager.show("删除p|"); } } }); // } // else { // } }) //地址薄正式新增或者编辑数据保? $("#amAddressBtn").on('click', function () { var numbers = $("#amNumber").val().replace(/(^\s*)|(\s*$)/g, ""); var name = $("#amName").val().replace(/(^\s*)|(\s*$)/g, ""); var phone = $("#amPhone").val().replace(/(^\s*)|(\s*$)/g, ""); var company = $("#amCompany").val().replace(/(^\s*)|(\s*$)/g, ""); var area = $("#amAddressCity").val().replace(/(^\s*)|(\s*$)/g, ""); var street = $("#amAddress").val().replace(/(^\s*)|(\s*$)/g, ""); //amNumber var PageCode = $("#amNumber").val().replace(/(^\s*)|(\s*$)/g, ""); var loginuser = localStorage.getItem("username") //alert("anNeme"+name); if (name == "") { myMessager.show("收g人姓名ؓ必填?); $("#amName").focus(); return; } if (/^[0-9-]*$/.test(phone)== false || phone == "") { myMessager.show("误入正收件h电话"); $("#amPhone").focus(); return; } if (phone == "" || phone.length > 20) { myMessager.show("误入正收件h电话"); $("#amPhone").focus(); return; } if (area.length == 0) { myMessager.show("请选择完整省市?); $("#amAddressCity").focus(); return; } if (street.length < 5) { myMessager.show("收g详细地址长度臛_?个字"); $("#amAddress").focus(); return; } if (street.length + area.length > 80) { myMessager.show("所在区?详细地址长度不能过80个字"); $("#amAddress").focus(); return; } // if (company != "" && company.length < 5) { // myMessager.show("收g人公叔R度至ؓ5?); // $("#amCompany").focus(); // return; // } if (numbers != "" && /^[0-9]*$/.test(numbers) == false) { myMessager.show("收g人编号只能输入数?); $("#amNumber").focus(); return; } var _area = area.split("-"); var pro = _area[0]; var city = _area[1]; var dis = _area[2]; var $btn = $("#amAddressBtn"); $btn.button('loading'); //var retString = responseData.toString(); //if (retString.indexOf("success") >= 0) { // if ($.zui.store.get("phone") != undefined) {//d if (isAdd) { //新增 $.ajax({ url: 'service/service.ashx', data: { fun: 'addaddress', openid: $.zui.store.get("phone"), name: name, company: company, numbers: numbers, phone: phone, pro: pro, city: city, area: dis, street: street, PageCode: PageCode, loginuser: loginuser }, method: 'post', success: function (res) { $btn.button('reset'); if (res == "1") { myMessager.show("保存成功"); $('#amModal').modal('hide'); //昄操作? checkAddressData("", "", "", "", $.zui.store.get("phone")); } else if (res == "5") { myMessager.show("收g人编号已l存?); } else if (res == "6") { myMessager.show("地址薄信息超q?5?); } else { myMessager.show("保存p|"); } } }); } else {//~辑 $.ajax({ url: 'service/service.ashx', data: { fun: 'editaddress', id: id, name: name, company: company, numbers: numbers, phone: phone, pro: pro, city: city, area: dis, street: street, openid: $.zui.store.get("phone"), loginuser: loginuser }, method: 'post', success: function (res) { $btn.button('reset'); if (res == "1") { myMessager.show("保存成功"); $('#amModal').modal('hide'); //昄操作? checkAddressData("", "", "", "", $.zui.store.get("phone")); } else if (res == "5") { myMessager.show("收g人编号已l存?); } else { myMessager.show("保存p|"); } } }); } // } // else { // } }); //地址薄确认选择数据 $("#cancelSelectBtn").on('click', function () { var rows = $('#addressTable').datagrid("getSelections"); //alert("rows**" + rows); if (rows.length == 0) { myMessager.show("请先选择数据"); return; } for (var i = 0; i < rows.length; i++) { rows[i].q单~号 = ""; rows[i].付款方式 = "C-付现"; rows[i].代收货款 = "0"; rows[i].件数 = "1"; rows[i].保h服务 = "0"; rows[i].备注 = "?; rows[i].{֛?= "?; rows[i].货物品名 = ""; rows[i].重量 = "1"; } results = rows; setData(results); //讄数据? $('#addressModal').modal('hide'); }); }); ///查询地址薄数? function checkAddressData(name, phone, company, numbers, openid) { //查询数据 var $btn = $("#addressCheckBtn"); var loginuser = localStorage.getItem("username") $btn.button('loading'); var _data = new Array(); // if ($.zui.store.get("phone") != undefined) {//d $.ajax({ url: 'service/service.ashx', data: { fun: 'checkaddress', openid: openid, name: name, company: company, numbers: numbers, phone: phone, loginuser: loginuser }, method: 'post', success: function (res) { //alert("查询Qres " + res); $btn.button('reset'); if (res != "") { _data = JSON.parse(res); } else { _data = new Array(); } // alert("查询Q_data " + _data); // ifQ_data==""Q? // { // _data = new Array(); // // } $('#addressTable').datagrid({//地址薄信? data: _data, loadMsg: '正在加蝲?..' }); } }); // } // else { // } } //新增修改地址?-昄? var id = 0;//修改时候的id var item = new Object();//修改时候的数据 var isAdd = true;//判断是新增还是修? function amAddressFun(flg) { if (flg == "add") { isAdd = true; document.getElementById("addressTitle").innerText = "新增数据"; $("#amNumber").val(""); $("#amName").val(""); $("#amPhone").val(""); $("#amCompany").val(""); $("#amAddress").val(""); $("#amAddressCity").val(""); $('#amModal').modal('show');//昄操作? } else { isAdd = false; document.getElementById("addressTitle").innerText = "修改数据"; var rows = $('#addressTable').datagrid("getSelections"); if (rows.length == 0) { myMessager.show("请选择要编辑的收g信息"); return; } if (rows.length > 1) { myMessager.show("请选择一条收件信息进行编?); return; } $('#amModal').modal('show');//昄操作? item = rows[0]; id = rows[0].Idno; $("#amNumber").val(rows[0].~号); $("#amName").val(rows[0].收g人姓?; $("#amPhone").val(rows[0].收gpȝ?; $("#amCompany").val(rows[0].收g人公?; $("#amAddress").val(rows[0].收g详细地址.replace(rows[0].?== null ? "" : rows[0].? "").replace(rows[0].?== null ? "" : rows[0].? "").replace(rows[0].?== null ? "" : rows[0].? "")); $("#amAddressCity").val(rows[0].?+ "-" + rows[0].?+ "-" + rows[0].?; } } //验证整数和小C留一?重量 function validateWeight(obj) { var t = $(obj).val(); if (/^[0-9]\d*(\.[0-9])?$/.test(t)) { if (t == "0") { $(obj).val("0.1"); return; } if (parseInt(t) > 10000) { $(obj).val("10000"); return; } } else { $(obj).val("0.1"); } } //客户~号转大? function toUpCustCode(obj) { var t = $(obj).val(); $(obj).val(t.toUpperCase()); } //讄收gZ息数据源 function setData(dataSource) { //alert("results"+dataSource); if (dataSource==null) { //var dt=new dataSource(); //alert("results"+dataSource); var arr= new Array(); $('#dg').datagrid({ data:arr, //method:'post', loadMsg: '正在加蝲?..' }); $('#dg').datagrid('reload'); //window.location.reload(); }else { $('#dg').datagrid({ data: dataSource, loadMsg: '正在加蝲?..' }); } } //获取当前旉 function setTime() { var times = new Date(); var month = parseInt(times.getMonth() + 1); var dates = times.getDate(); var hours = times.getHours(); var minutes = times.getMinutes(); if (month < 10) { month = "0" + month; } if (dates < 10) { dates = "0" + dates; } if (hours < 10) { hours = "0" + hours; } if (minutes < 10) { minutes = "0" + minutes; } return times.getFullYear() + "/" + month + "/" + dates + " " + hours + ":" + minutes + ":00"; } //讄当天旉 function setTimes(flg) { var times = new Date(); var month = parseInt(times.getMonth() + 1); var dates = times.getDate(); if (month < 10) { month = "0" + month; } if (dates < 10) { dates = "0" + dates; } if (flg == "0") { return times.getFullYear() + "/" + month + "/" + dates + " 00:00"; } else { return times.getFullYear() + "/" + month + "/" + dates + " 23:59"; } } //导入excel function inExcel(obj) { importf(obj); } /* FileReader共有4U读取方法: 1.readAsArrayBuffer(file)Q将文gd为ArrayBuffer? 2.readAsBinaryString(file)Q将文gdZq制字符? 3.readAsDataURL(file)Q将文gd为Data URL 4.readAsText(file, [encoding])Q将文gd为文本,encoding~省gؓ'UTF-8' */ var results = []; var wb;//d完成的数? var rABS = false; //是否文件读取ؓ二进制字W串 function fixdata(data) { //文g{BinaryString var o = "", l = 0, w = 10240; for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w))); o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w))); return o; } function importf(obj) {//导入 var page_flag="0"; if (document.getElementById("files").files[0].name.indexOf(".xls") < 0 && document.getElementById("files").files[0].name.indexOf(".xlsx") < 0) { $(obj).val(""); myMessager.show("请选择excel文g!"); return; } try { $("#errorlist").hide(); var f = document.getElementById("files").files[0]; var reader = new FileReader(); reader.onload = function (e) { var data = e.target.result; if (rABS) { wb = XLSX.read(btoa(fixdata(data)), {//手动转化 type: 'base64' }); } else { wb = XLSX.read(data, { type: 'binary' }); } //wb.SheetNames[0]是获取Sheets中第一个Sheet的名? //wb.Sheets[Sheet名]获取W一个Sheet的数? results = []; barcodes = []; results = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]); if (results.length > 0) { // 判断是否过200白条数据 if (results.length > 200) { new $.zui.Messager("扚w导入最多导?00?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } $(obj).val(""); // 创徏地址解析器实? for (var i = 0; i < results.length; i++) { var k = i; results[i].ID = i + 1; if (results[i].q单~号 == undefined || (results[i].q单~号.replace(/(^\s*)|(\s*$)/g, "").length != 12 )) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【运单编受不正确Q只支持12!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].q单~号.toString().substring(0, 3) != '600') { new $.zui.Messager('W? + parseInt(k + 2) + "行中【运单编受不正确Q请以?00】开?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (/^[0-9]*$/.test(results[i].q单~号.toString()) == false) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【运单编受运单号必须为数?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag = "1"; results = null; return; } if (results[i].q单~号.toString().length == 12) { //取前11? var strFirst11 = results[i].q单~号.toString().substring(0, 11); var intLast1 = results[i].q单~号.toString().substring(results[i].q单~号.toString().length - 1, results[i].q单~号.toString().length); var intMode = (strFirst11 % 7); if (intLast1 != intMode) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【运单编受运单号错误请重新输?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; setData(results); return; } } if (customernumber.length > 0 && /^[A-Za-z]*$/.test(customernumber) == true) { myMessager.show("客户~号不能全ؓ字母"); $("#customernumber").focus(); page_flag="1"; results=null; return; } if (customernumber.length > 0 && /^[0-9]*$/.test(customernumber) == true) { myMessager.show("客户~号不能全ؓ数字"); $("#customernumber").focus(); page_flag="1"; results=null; return; } if (results[i].收g人姓?== undefined || results[i].收g人姓?replace(/(^\s*)|(\s*$)/g, "").length == 0) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【收件h姓名】必d?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].收g人姓?!= undefined || results[i].收g人姓?replace(/(^\s*)|(\s*$)/g, "").length > 0) { if (RegExp(/先生/).test(results[i].收g人姓? || RegExp(/姐/).test(results[i].收g人姓? || RegExp(/奛_/).test(results[i].收g人姓?) { new $.zui.Messager('Excel中第' + parseInt(k + 2) + "行【收件h姓名】不可输入“先生、小姐、女士”等U呼”,请重C改Excel表后导入Q谢谢!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; } } if (results[i].收g人姓?!= undefined && results[i].收g人姓?replace(/(^\s*)|(\s*$)/g, "").length > 10) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【收件h姓名】超出最大输入长?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].收gpȝ?== undefined||results[i].收gpȝ?replace(/(^\s*)|(\s*$)/g, "").length ==0) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【收件h联系电话】必d?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].收gpȝ?!= undefined) { var phone = results[i].收gpȝ?replace(/\s+/g, ""); if ((/^[0-9-]*$/.test(phone.replace(/(^\s*)|(\s*$)/g, "")) == false)) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【收件h联系电话】不正确!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag = "1"; results = null; return; } } if (results[i].收gpȝ?!= undefined && results[i].收gpȝ?replace(/(^\s*)|(\s*$)/g, "").length > 20) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【收件h联系电话】输入超出最大长?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].收g人公?== undefined) { results[i].收g人公?= ''; } // add wangweiqiu if (results[i].收g人公?!= undefined && results[i].收g人公?replace(/(^\s*)|(\s*$)/g, "").length >20) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【收件h公司】超出最大输入长?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } //if (results[i].收g省市?== undefined) { // new $.zui.Messager('W? + parseInt(k + 2) + "行中【收件省市区】必d?", { // icon: 'bell', // placement: 'top', // close: false // }).show(); // return; //} if (results[i].收g详细地址 == undefined) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【收件详l地址】必d?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } // add wangweiqiu if (results[i].收g详细地址 != undefined && results[i].收g详细地址.replace(/(^\s*)|(\s*$)/g, "").length > 80) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【收件详l地址】超出最大输入长?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].件数 == undefined) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【g数】必d?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].件数.replace(/(^\s*)|(\s*$)/g, "") == "0") { new $.zui.Messager('W? + parseInt(k + 2) + "行中【g数】必Mؓ数字Qƈ且大?!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (/^[0-9]*$/.test(results[i].件数.replace(/(^\s*)|(\s*$)/g, "")) == false) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【g数】必Mؓ数字Qƈ且大?!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (parseInt(results[i].件数) > 150) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【g数】取g能给大于150!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; setData(resultssss) return; } if (results[i].重量 == undefined) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【重量】必d?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].重量.replace(/(^\s*)|(\s*$)/g, "") == "0" || results[i].重量.replace(/(^\s*)|(\s*$)/g, "") == "0.1") { new $.zui.Messager('W? + parseInt(k + 2) + "行中【重量】必Mؓ数字Qƈ且大?.1!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (/^[0-9]\d*(\.[0-9])?$/.test(results[i].重量.replace(/(^\s*)|(\s*$)/g, ""))) { if (parseFloat(results[i].重量.replace(/(^\s*)|(\s*$)/g, "")) > 10000) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【重量】必Mؓ数字Qƈ且小于等?0000!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } } if (/^[0-9]\d*(\.[0-9])?$/.test(results[i].重量.replace(/(^\s*)|(\s*$)/g, "")) == false) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【重量】必Mؓ数字!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].内g详情 == undefined) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【内件详情】必d?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].内g详情 != undefined && results[i].内g详情.replace(/(^\s*)|(\s*$)/g, "") == "") { new $.zui.Messager('W? + parseInt(k + 2) + "行中【内件详情】必d?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } // add wangweiqiu if (results[i].内g详情 != undefined && results[i].内g详情.replace(/(^\s*)|(\s*$)/g, "").length > 40) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【内件详情】超出最大输入长?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].付款方式 == undefined) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【付ƾ方式】必d?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].付款方式 != undefined) { if (results[i].付款方式.replace(/(^\s*)|(\s*$)/g, "") == "C-付现" || results[i].付款方式.replace(/(^\s*)|(\s*$)/g, "") == "D-C" || results[i].付款方式.replace(/(^\s*)|(\s*$)/g, "") == "E-出口月结" || results[i].付款方式.replace(/(^\s*)|(\s*$)/g, "") == "O-其他" || results[i].付款方式.replace(/(^\s*)|(\s*$)/g, "") == "T-W三Ҏl?) { } else { new $.zui.Messager('W? + parseInt(k + 2) + "行中【付ƾ方式】必Mؓ【C-付现】或【D-C】或【E-出口月结】或【O-其他】或【T-W三Ҏl?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } } if (results[i].代收货款 == undefined) { results[i].代收货款 = "0"; } if (results[i].代收货款 != undefined) { if (/^[0-9]\d*(\.[0-9])?$/.test(parseFloat(results[i].代收货款)) == false) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【代收货ƾ】必Mؓ数字!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } } if (/^[0-9]\d*(\.[0-9])?$/.test(results[i].代收货款.replace(/(^\s*)|(\s*$)/g, ""))) { if (parseFloat(results[i].代收货款.replace(/(^\s*)|(\s*$)/g, "")) > 5000) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【代收货ƾ】必Mؓ数字Qƈ且要于{于5000!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; setData(results); return; } } if (results[i].保h服务== undefined) { results[i].保h服务 = "0"; } if (results[i].保h服务 != undefined) { if (/^[0-9]\d*(\.[0-9])?$/.test(parseFloat(results[i].保h服务)) == false) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【保h务】必Mؓ数字!", { icon: 'bell', placement: 'top', close: false }).show(); results=null; page_flag="1"; return; } } if (parseFloat(results[i].保h服务.replace(/(^\s*)|(\s*$)/g, "")) > 200000) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【保h务】必d能ؓ数字且小?00000!", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } if (results[i].{֛?== undefined) { results[i].{֛?= ""; } if (results[i].{֛?!= undefined) { if (results[i].{֛?replace(/(^\s*)|(\s*$)/g, "") == "? || results[i].{֛?replace(/(^\s*)|(\s*$)/g, "") == "?) { } else { new $.zui.Messager('W? + parseInt(k + 2) + "行中【签回单】必Mؓ【是】或【否?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } } if (results[i].备注 == undefined) { results[i].备注 = ""; } if (results[i].备注 != undefined && results[i].备注 != undefined && results[i].备注.replace(/(^\s*)|(\s*$)/g, "").length > 40) { new $.zui.Messager('W? + parseInt(k + 2) + "行中【备注】输入超出最大长?", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; return; } } // being for (var i = 0; i < results.length; i++) { barcodes.push(results[i].q单~号) } let nary = barcodes.slice().sort(); for (let i = 0; i < barcodes.length; i++) { if (nary[i] == nary[i + 1]) { //alert("数组重复内容Q? + nary[i]); new $.zui.Messager("q单~号Q? + nary[i]+"重复", { icon: 'bell', placement: 'top', close: false }).show(); page_flag="1"; results=null; setData(results); return; } } //end //alert("page_flag"+results); // if (page_flag=="1") { // // setData(results); // results=null; // }else { // // } setData(results); } else { new $.zui.Messager('没有数据,请先填写Excel数据', { icon: 'bell', placement: 'top', close: false }).show(); $(obj).val(""); } }; if (rABS) { reader.readAsArrayBuffer(f); } else { reader.readAsBinaryString(f); } } catch (ex) { new $.zui.Messager("您的览器不支持导入功能,h换浏览器Q?, { icon: 'bell', placement: 'top', close: false }).show(); $(obj).val(""); } } function exit() { $('#exitModal').modal('show'); } function doexit() { $('#exitModal').modal('hide'); $.zui.store.remove("rr");//用户? $.zui.store.remove("phone");//手机L或者openid //document.getElementById('login').style.display = ""; document.getElementById('menu').style.display = "none"; } </script>