pass.html 3.86 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <title>main</title>
    <script src="/ufoPlatform/js/include.js"></script>
</head>
<body class="easyui-layout" fit="true">

<div id="passDiv" region="center">
    <table id="passTable" border="1px" cellpadding="1" cellspacing="0" align="center"
           style="margin-top: 30px; line-height: 30px;width:95%;border-color: #999999">
       <tr>
           <td>买家地址:</td>
           <td colspan="2" >
               <span id="receiveInfo"></span>
           </td>
       </tr>
       <tr>
           <td>快递公司:</td>
           <td colspan="2">
               <input id="expressCompany"  class="easyui-combobox"/>
           </td>
       </tr>
       <tr>
           <td>快递单号:</td>
           <td colspan="2">
               <input type="text" class="easyui-textbox" id="waybillCode" />
           </td>
       </tr>
    </table>

</div>
<script>
    $(function () {
        //根据买家订单号获取买家收货地址
        var form = new FormData();
	    form.append("orderCode", document.getElementById("buyerOrderCode").value);
        //发送请求
		$.ajax({
		     type: "POST",
             url: contextPath + '/buyerOrder/getReceiveInfoByOrderCode',
             data: form,
             async: false,
             cache: false,
             contentType: false,
             processData: false,
             dataType: 'json',
             success: function (result) {
                 if(result.code == 200) {
                	 var name = result.data.receiveName;
                	 var mobile = result.data.receiveMobile;
                	 var address = result.data.receiveAddress;
                	 $("#receiveInfo").html("姓名:" + name + "<br>" + "手机号:" + mobile + "<br>" + "地址:" + address);
                 }
                 else {
                     $.messager.alert("失败", result.message, "error");
                 }
             }
         });                    
    	
    	
    	// 快递公司下拉框
        $("#expressCompanySelector").combobox({
            valueField : "activityId",
            textField : "activityName",
            selectOnNavigation : true,
            editable:false,
            selectOnNavigation : true,
            url : contextPath + "/MakePriceController/getActivityMenu.do",
            // 品牌联动
            onChange:function(data){
				if(data == "") {
					$("#name").textbox({disabled:false});
					$("#startTime").datetimebox({disabled:false});
					$("#endTime").datetimebox({disabled:false});
				} else {
	                $("#name").textbox({disabled:true});
	                $("#startTime").datetimebox({disabled:true});
	                $("#endTime").datetimebox({disabled:true});
					//创建formdata
		            var form = new FormData();
		            form.append("activityId", data);
		            //发送请求
		            $.ajax({
		                type: "POST",
		                url: contextPath + '/MakePriceController/getActivity.do',
		                data: form,
		                async: false,
		                cache: false,
		                contentType: false,
		                processData: false,
		                dataType: 'json',
		                success: function (result) {
		                    if(result.code == 200) {
		                    	$("#name").textbox('setValue',result.data.title);
		                    	$("#startTime").datetimebox('setValue',result.data.effectiveTime);
		    	                $("#endTime").datetimebox('setValue',result.data.effectiveTimeEnd);
		                    }
		                    else {
		                        $.messager.alert("失败", result.message, "error");
		                    }
		                }
		            });
				}
            },
            loadFilter: function (data) {
                return defaultLoadFilter(data);
            }
        });
    });
    
</script>
</body>
</html>