<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>私塾家</title>
<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
<script th:include="sys/common/metaJS" th:remove="tag"></script> 
<script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/js/city/city.json.js}"></script>
<script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/js/city/citySetMe_V.js}"></script>
<script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/js/city/Popt.js}"></script>
<script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/sys/js/My97DatePicker/WdatePicker.js}"></script>
</head>
 <style type="text/css">
   body{min-width:180px;}
       .select1{
   		    width:100%;
		    height: 32px;
		    line-height: 32px;
		    border-top: solid 1px #a7b5bc;
		    border-left: solid 1px #a7b5bc;
		    border-right: solid 1px #ced9df;
		    border-bottom: solid 1px #ced9df;
		    opacity:1;
	        margin-bottom: 10px;
    	}
    	.btn{
    	  width: 100px;
    	}
     label.control-label-error {color: Red;}	
     
._citys {     background-color: whitesmoke;width: 450px; display: inline-block; border: 2px solid #eee; padding: 5px; position: relative; }
._citys span { color: #05920a; height: 15px; width: 15px; line-height: 15px; text-align: center; border-radius: 3px; position: absolute; right: 10px; top: 10px; border: 1px solid #05920a; cursor: pointer; }
._citys0 { width: 95%; height: 34px; line-height: 34px; display: inline-block; border-bottom: 2px solid #05920a; padding: 0px 5px; font-size:14px; font-weight:bold; margin-left:6px; }
._citys0 li { display: inline-block; line-height: 34px; font-size: 15px; color: #888; width: 80px; text-align: center; cursor: pointer; }
._citys1 { width: 100%; display: inline-block; padding: 10px 0; }
._citys1 a { width: 83px; height: 35px; display: inline-block; background-color: #f5f5f5; color: #666; margin-left: 6px; margin-top: 3px; line-height: 35px; text-align: center; cursor: pointer; font-size: 12px; border-radius: 5px; overflow: hidden; }
._citys1 a:hover { color: #fff; background-color: #05920a; }
.AreaS { background-color: #05920a !important; color: #fff !important; }
#school{
	margin-left: 110px;
	padding-bottom: 10px;
}  
#school span{
  	min-width: 25%;
    float: left;
    margin-bottom: 10px;
}
.joinseachform li{
	width: 50%;
	margin-right: 0px;
	padding-right: 0px;
}

.schoolseachform li{
	width: 50%;
	margin-right: 0px;
	padding-right: 0px;
}    

dtext{
	color: red;
	cursor: pointer;
}
.forminfo li label{
	text-align: right;
	padding-right: 10px
}
  
</style>
<body>
<div class="formbody">
		<ul class="forminfo">
			<input type="hidden" id="id" class="dfinput fl" name="id" th:value="${awardSncode.id}"/>
			
			<li>
				<label>物流单号：	<b>*</b></label>
				<input type="text" id="emsNumber" class="dfinput fl" name="emsNumber" th:value="${awardSncode.emsNumber}" />
			</li>
			
			<li>
				<label>钉钉单号：<b></b></label>
				<input type="text" id="dingNumber" class="dfinput fl" name="dingNumber" th:value="${awardSncode.dingNumber}" />
			</li>
			
			
			<li>
				<label>收货人：<b>*</b></label>
				<input type="text" id="people" class="dfinput fl" name="people" th:value="${awardSncode.people}" />
			</li>
			
			<li>
				<label>联系电话：<b>*</b></label>
				<input type="text" id="telephone" class="dfinput fl" name="telephone" th:value="${awardSncode.telephone}" />
			</li>
			
			<li>
				<label>配送地址：<b>*</b></label>
				<input type="text" id="address" class="dfinput fl" name="address" th:value="${awardSncode.address}"  />
			</li>
			
			<li style="margin-bottom:3px">
				<label>快递单号：<b></b></label>
				<input type="hidden" id="img" th:data-path="${awardSncode.img}" />
				<plug id="pluguploadid" th:include="sys/common/imgUpload"  th:inline="javascript"  data-bindelem="#img" th:data-filepaths="${awardSncode.img}" data-type="1" data-maxnum="2"  \>
			</li>
			
			
			<li style="padding-top: 20px" th:if="${param.type+'' eq '1'}">
				<label>&nbsp;</label>
				<button type="submit" onclick="save();" class="btn">提交</button>
				<button type="button" class="btn" onclick="closeWin();">取消</button>
			</li>
			
		</ul>
			
</div>

</body>
<script type="text/javascript">

function save(){
	if($("#emsNumber").val()==''){
		parent.layer.msg("物流单号不能同时为空",{icon:11});
		return
	}
	
	if($("#people").val()==''){
		parent.layer.msg("收货人不能为空",{icon:11});
		return
	}
	
	if($("#telephone").val()==''){
		parent.layer.msg("联系电话不能为空",{icon:11});
		return
	}
	
	if($("#address").val()==''){
		parent.layer.msg("配送地址不能为空",{icon:11});
		return
	}
	
	parent.layer.confirm("确定保存物流信息?", {
		icon: 4, btn: ['确定','关闭'],offset: '100px' //按钮
	}, function(){
		var url="[[${sysUrl}]]/sys/award/sncode/ems/save";
		var params ={
			'id' : $("#id").val(),
            'remarks' : $("#remarks").val(),
            
            'dingNumber' : $("#dingNumber").val(),
            'emsNumber' : $("#emsNumber").val(),
            'people' : $("#people").val(),
            'telephone' : $("#telephone").val(),
            'img' : $("#img").val(),
            'address':$("#address").val()
        };
		$.post(url,params,function(data){
			if(data.meta.success){
				parent.layer.msg("保存成功",{icon:1});
				parent.location.reload();
				parent.layer.close(parent.layer.getFrameIndex(window.name));
			}else{
				parent.layer.msg(data.meta.message,{icon:11});
			}
		});
	});
}



</script>
</html>