You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simple-yewu/frontend/views/insurer/original-ems-edit1.php

144 lines
5.8 KiB

5 years ago
<?php
use \common\libs\MyLib;
?>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<form id="theFrm">
<tr>
<td colspan="6" align="center">送单表</td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">收件人</td>
<td width="300" height="25" class="td_bg"><input class="Ainput" name="insurer_name" type="text" value="" style="width:250px;" /></td>
<td width="100" height="25" class="td_bg">联系电话</td>
<td width="300" height="25" class="td_bg"><input class="Ainput" name="link_tel" type="text" value="" style="width:250px;" /></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">收货人省份</td>
<td height="25" class="td_bg"><input class="Ainput province" name="receiver_province" type="text" value="" style="width:250px;"/></td>
<td width="100" height="25" class="td_bg">收货人城市</td>
<td height="25" class="td_bg"><input class="Ainput city" name="receiver_city" type="text" value="" style="width:250px;"/></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">收货人区县</td>
<td height="25" class="td_bg"><input class="Ainput county" name="receiver_county" type="text" value="" style="width:250px;"/></td>
<td width="100" height="25" class="td_bg">收货人详细地址</td>
<td height="25" class="td_bg"><input class="Ainput address" name="receiver_address" type="text" value="" style="width:250px;"/></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">保险公司</td>
<td height="25" class="td_bg"><input class="Ainput sender_name" name="sender_name" type="text" value="人保" style="width:250px;"/></td>
<td width="100" height="25" class="td_bg">快递备注</td>
<td height="25" class="td_bg"><input class="Ainput sender_name" name="ems_remark" type="text" value="" style="width:250px;"/></td>
</tr>
<tr>
<td width="100" height="25" class="td_bg">快递单号</td>
<td height="25" class="td_bg"><input class="Ainput ems_no_name" name="ems_no" type="text" value="" style="width:250px;"/></td>
<td width="100" height="25" class="td_bg"></td>
<td height="25" class="td_bg"></td>
</tr>
</form>
<tr>
<td height="22" colspan="6" align="center" class="td_bg">
<input id="sub-btn" type=button class="ACT_btn" name=Submit2 value="提交"/>
<input id="print-btn" type=button class="ACT_btn" name=Submit1 value=" 打印 "/>
&nbsp;&nbsp;
<!-- <input id="back-btn" type="button" class="ACT_btn ui-icon-close" name="Submit3" value=" 关闭 ">-->
</td>
</tr>
</table>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript">
function isNull(data){
if(data == "" || data == undefined || data == null){
return true;
}else{
return false;
}
}
$(function () {
//打印按钮
$("#print-btn").click(function(){
var params = $("#theFrm").serialize();
var province = $('.province').val();
var city = $('.city').val();
var county = $('.county').val();
var address = $('.address').val()
var sender_name = $('.sender_name').val()
var ems_no = $('.ems_no_name').val()
if(isNull(province)){
alert('收货人省份必填项!');
return false;
}
if(isNull(city)){
alert('收货人城市必填项!');
return false;
}
if(isNull(county)){
alert('收货人区县必填项!');
return false;
}
if(isNull(address)){
alert('收货人详细地址必填项!');
return false;
}
if(isNull(sender_name)){
alert('保险公司必填项!');
return false;
}
window.open('/print/op-ems-print2?'+params);
});
$('#sub-btn').click(function(){
var province = $('.province').val();
var city = $('.city').val();
var county = $('.county').val();
var address = $('.address').val()
var sender_name = $('.sender_name').val()
var ems_no = $('.ems_no_name').val()
if(isNull(province)){
alert('收货人省份必填项!');
return false;
}
if(isNull(city)){
alert('收货人城市必填项!');
return false;
}
if(isNull(county)){
alert('收货人区县必填项!');
return false;
}
if(isNull(address)){
alert('收货人详细地址必填项!');
return false;
}
var params = $('#theFrm').serialize();
$.post('/insurer/kuaidi-save',params,function(obj){
if(obj.success) {
$('#sub-btn').attr('disabled',true);
alert(obj.msg);
}else{
alert(obj.msg);
}
},'json');
});
//返回按钮
// $('#back-btn').click(function(){
//// window.location.href='/insurer/original-send-mng?<?////=$back_params?>////';
//// window.close();
// });
})
</script>