北京络捷斯特第三方物流信息系统技术解析(三) 订单录入-出库订单

北京络捷斯特第三方物流信息系统技术解析(三) 订单录入-出库订单

2.1.2 出库订单

出库订单包括有订单信息、订单出库信息、订单货品三个标签页的信息编写。

订单信息界面截图:


2.1.2图(1)

订单出库信息截图:


2.1.2图(2)

订单货品截图:


2.1.2图(3)

出库订单功能实现:

第一步:数据库

1、        表与关系


2.1.2图(4)

表1:订单信息表(PW_OrdersInformationTable)

列名

数据类型

主键/外键

说明

OrdersInformationID

int

主键

订单信息ID

OrdersMark

nchar(50)

 

订单号

ClientID

int

外键

客户ID

ClientInstructMark

nchar(50)

 

客户指令号

PurchaseOrdersNumber

nchar(50)

 

采购订单号

OrdersTypeID

int

外键

订单类型ID

UrgencyDegreeID

int

外键

紧急程度ID

OrdersSourceID

int

外键

订单来源ID

PledgeBankID

int

外键

质押银行ID

Note

nchar(50)

 

备注

EntryTime

date

 

录入时间

RepairNo

Bit

 

补录否

表2:订单出库信息表(PW_OrdersOutboundInformationTable)

列名

数据类型

主键/外键

说明

OrdersOutboundInformationID

int

主键

订单出库信息ID

OrdersInformationID

int

外键

订单信息ID

StoreroomID

int

外键

库房ID

OutboundTypeID

int

外键

出库类型ID

OutboundWayID

int

外键

出库方式ID

EstimatedOutboundTime

date

 

预计出库时间

Note

nchar(50)

 

备注

表3:订单出库明细表(PW_OrdersOutboundDetailedTable)

列名

数据类型

主键/外键

说明

OrdersOutboundDetailedID

int

主键

订单出库明细ID

OrdersOutboundInformationID

int

外键

订单出库信息ID

GoodsID

int

外键

货品ID

Batch

nchar(50)

 

批次

Quantity

decimal(18, 2)

 

数量

Note

nchar(50)

 

备注

表4:运输信息表SYS_TransportationInformationTable)

列名

数据类型

主键/外键

说明

TransportationInformationID

int

主键

运输信息ID

OrdersWarehousingInformationID

int

外键

订单入库信息ID

OrdersOutboundInformationID

int

外键

订单出库信息ID

RiseCarryLandID

int

外键

起运地ID

ArriveLandID

int

外键

到达地ID

RiseCarryAddress

nchar(50)

 

起运地址

LinkmanName

nchar(50)

 

联系人姓名

LinkmanPhone

nchar(50)

 

联系人电话

GoodsUnitID

int

外键

收货单位ID

LinkmanAddress

nchar(50)

 

联系人地址

StoreroomID

int

外键

库房ID

TransportationWayID

int

外键

运输方式ID

ShipmentTime

date

 

起运时间

EstimatedArriveTime

date

 

预计到达时间

Note

nchar(50)

 

备注

Freight

decimal(18, 2)

 

运费

InsureFee

decimal(18, 2)

 

保险费

OtherCost

decimal(18, 2)

 

其它费用

InsureMoney

decimal(18, 2)

 

投保金额

Fax

nchar(50)

 

传真

表5:配送信息表(SYS_DistributionInformationTable)

列名

数据类型

主键/外键

说明

DistributionInformationID

int

主键

仓配配送信息ID

OrdersOutboundInformationID

int

外键

订单出库信息ID

DistributionAreaID

int

外键

配送区域ID

IncomeCommodityUnitID

int

外键

收货单位ID

ArriveAddress

nchar(50)

 

到达地址

RelationPhone

nchar(50)

 

联系电话

Fax

nchar(50)

 

传真

PaymentWayID

int

外键

付款方式ID

PrepaidMoney

decimal(18, 2)

 

预付金额

Freight

decimal(18, 2)

 

运费

InsureFee

decimal(18, 2)

 

保险费

OtherCost

decimal(18, 2)

 

其它费用

InsureMoney

decimal(18, 2)

 

投保金额

ReceivableCostNote

nchar(50)

 

应收费用备注

ServeWayID

int

外键

服务方式ID

DistributionTime

date

 

配送时间

ArriveGoodsTime

date

 

到货时间

CarModelID

int

外键

车型ID

Note

nchar(50)

 

备注

SignForName

nchar(50)

 

签收人

SignForTime

date

 

签收时间

SignForNo

Bit

 

签收否

ReturnSingleMan

nchar(50)

 

返单人

ReturnSingleTime

date

 

返单时间

CurrentPlace

nchar(50)

 

当前地点

表6:货品表(SYS_GoodsTable)

列名

数据类型

主键/外键

说明

GoodsID

int

主键

货品ID

GoodsCoding

nchar(50)

 

货品编码

GoodsName

nchar(50)

 

货品名称

Standard

nchar(50)

 

规格

Weight

decimal(18, 2)

 

重量

UnitID

int

外键

单位ID

ClientID

int

外键

客户ID

BarCode

nchar(50)

 

条形码

SpellCode

nchar(50)

 

拼音码

GoodsCategoryID

int

外键

货品类别ID

Model

nchar(50)

 

型号

Manufacturer

nchar(50)

 

生产厂家

GoodsTypeID

int

外键

货品类型ID

QualityID

int

外键

质量ID

UnitPrice

decimal(18, 2)

 

单价

Note

nchar(50)

 

备注

第二步:控制器(Controllers


2.1.2图(5)


2.1.2图(6)

Contrlles(控制器)代码:

        #region 新增出库订单信息
        /// <summary>
        /// 接收界面参数,新增出库订单信息
        /// </summary>
        /// <param name="OrdersInformationID">订单信息ID</param>
        /// <param name="StoreroomID">库房ID</param>
        /// <param name="OutboundTypeID">出库类型ID</param>
        /// <param name="OutboundWayID">出库方式ID</param>
        /// <param name="EstimatedOutboundTime">预计出库时间</param>
        /// <param name="Note">备注</param>
        /// <returns>int</returns>
        public int InsertOrdersOutboundInformationTable(int OrdersInformationID,int StoreroomID,int OutboundTypeID, int OutboundWayID,DateTime EstimatedOutboundTime,string Note) 
        {
            Models.PW_OrdersOutboundInformationTable myOrdersOutboundInformation = new Models.PW_OrdersOutboundInformationTable();
            
            myOrdersOutboundInformation.OrdersInformationID = OrdersInformationID;
            myOrdersOutboundInformation.StoreroomID = StoreroomID;
            myOrdersOutboundInformation.OutboundTypeID = OutboundTypeID;
            myOrdersOutboundInformation.OutboundWayID = OutboundWayID;
            myOrdersOutboundInformation.EstimatedOutboundTime = EstimatedOutboundTime;
            myOrdersOutboundInformation.Note = Note;

            myDDGL.PW_OrdersOutboundInformationTable.AddObject(myOrdersOutboundInformation);
            int i = myDDGL.SaveChanges();
            if (i > 0)
            {
                int OrdersOutboundInformationID = (from tbOrdersInformation in myDDGL.PW_OrdersOutboundInformationTable select tbOrdersInformation.OrdersOutboundInformationID).Max();
                return OrdersOutboundInformationID;
            }
            else
            {
                return 0;
            }
        }
        #endregion
        #region 绑定区域下拉框
        /// <summary>
        /// 遍历查询区域数据
        /// </summary>
        /// <returns>Json</returns>
        public ActionResult cboAreaTable() 
        {
            var dtArea = from tbArea in myDDGL.SYS_AreaTable
                        select new
                        {
                            AreaID = tbArea.AreaID,
                            AreaEncoded = tbArea.AreaEncoded,
                            AreaName = tbArea.AreaName
                        };
            List<Dictionary<string, object>> ListReturn = new List<Dictionary<string, object>>();
            foreach (var item in dtArea)
            {
                Dictionary<string, object> itemArea = new Dictionary<string, object>();
                foreach (System.Reflection.PropertyInfo p in item.GetType().GetProperties())
                {
                    itemArea.Add(p.Name, p.GetValue(item, null));//将数据转换成(键名,键值)的格式
                }
                ListReturn.Add(itemArea);
            }
            return Json(ListReturn, JsonRequestBehavior.AllowGet);
        }
        #endregion
        #region 选择仓配时,新增配送信息
        /// <summary>
        /// 出库方式选择了仓配时,接收界面层参数,出库订单要添加配送信息
        /// </summary>
        /// <param name="OrdersOutboundInformationID">订单出库信息ID</param>
        /// <param name="DistributionAreaID">配送区域ID</param>
        /// <param name="IncomeCommodityUnitID">收货单位ID</param>
        /// <param name="ArriveAddress">到达地址</param>
        /// <param name="Linkman">联系人</param>
        /// <param name="RelationPhone">联系电话</param>
        /// <param name="Fax">传真</param>
        /// <param name="PaymentWayID">付款方式ID</param>
        /// <param name="PrepaidMoney">预付金额</param>
        /// <param name="Freight">运费</param>
        /// <param name="InsureFee">保险费</param>
        /// <param name="OtherCost">其它费用</param>
        /// <param name="InsureMoney">投保金额</param>
        /// <param name="ReceivableCostNote">应收费用备注</param>
        /// <param name="ServeWayID">服务方式ID</param>
        /// <param name="DistributionTime">配送时间</param>
        /// <param name="ArriveGoodsTime">到货时间</param>
        /// <param name="CarModelID">车型ID</param>
        /// <param name="Note">备注</param>
        /// <returns>Json</returns>
        public ActionResult InsertDistributionInformation(string OrdersOutboundInformationID,string DistributionAreaID,string IncomeCommodityUnitID, string ArriveAddress,string Linkman,string RelationPhone,string Fax,string PaymentWayID, string PrepaidMoney,string Freight,string InsureFee,string OtherCost,string InsureMoney, string TotalMoney,string ReceivableCostNote,string ServeWayID,string DistributionTime, string ArriveGoodsTime,string CarModelID,string Note) 
        {   //实例化配送信息表
            Models.SYS_DistributionInformationTable myDistributionInformation = new Models.SYS_DistributionInformationTable();

            myDistributionInformation.OrdersOutboundInformationID = Convert.ToInt32(OrdersOutboundInformationID);
            myDistributionInformation.DistributionAreaID = Convert.ToInt32(DistributionAreaID);
            myDistributionInformation.IncomeCommodityUnitID = Convert.ToInt32(IncomeCommodityUnitID);
            myDistributionInformation.ArriveAddress = ArriveAddress;
            myDistributionInformation.Linkman = Linkman;
            myDistributionInformation.RelationPhone = RelationPhone;
            myDistributionInformation.Fax = Fax;
            myDistributionInformation.PaymentWayID = Convert.ToInt32(PaymentWayID);
            myDistributionInformation.PrepaidMoney = PrepaidMoney;
            myDistributionInformation.Freight = Freight;
            myDistributionInformation.InsureFee = InsureFee;
            myDistributionInformation.OtherCost = OtherCost;
            myDistributionInformation.InsureMoney = InsureMoney;
            myDistributionInformation.ReceivableCostNote = ReceivableCostNote;
            myDistributionInformation.ServeWayID = Convert.ToInt32(ServeWayID);
            myDistributionInformation.DistributionTime = Convert.ToDateTime(DistributionTime);
            myDistributionInformation.ArriveGoodsTime = Convert.ToDateTime(ArriveGoodsTime);
            myDistributionInformation.CarModelID = Convert.ToInt32(CarModelID);
            myDistributionInformation.Note = Note;
            myDistributionInformation.SignForNo = false;
            myDistributionInformation.ReturnSingleReceiveNo = false;

            myDDGL.SYS_DistributionInformationTable.AddObject(myDistributionInformation);
            int i = myDDGL.SaveChanges();
            if (i > 0)
            {
                return Json("true", JsonRequestBehavior.AllowGet);
            }
            else
            {
                return Json("false", JsonRequestBehavior.AllowGet);
            }
        }
        #endregion
        #region 新增出库明细
        /// <summary>
        /// 接收界面层的货品信息,信息出库货品信息
        /// </summary>
        /// <param name="OrdersOutboundInformationID">订单出库信息ID</param>
        /// <param name="GoodsID">货品ID</param>
        /// <param name="Batch">批次</param>
        /// <param name="Quantity">数量</param>
        /// <param name="Note">备注</param>
        /// <returns>Json</returns>
        public ActionResult InsertOrdersOutboundDetailedTable(int OrdersOutboundInformationID,int GoodsID,
                                                            string Batch,string Quantity,string Note) 
        {   //实例化出库明细信息表
            Models.PW_OrdersOutboundDetailedTable myOrdersOutboundDetailed = new Models.PW_OrdersOutboundDetailedTable();

            myOrdersOutboundDetailed.OrdersOutboundInformationID = OrdersOutboundInformationID;
            myOrdersOutboundDetailed.GoodsID = GoodsID;
            myOrdersOutboundDetailed.Batch = Batch;
            myOrdersOutboundDetailed.Quantity = Quantity;
            myOrdersOutboundDetailed.Note = Note;

            myDDGL.PW_OrdersOutboundDetailedTable.AddObject(myOrdersOutboundDetailed);//保存以上参数到数据库表
            int i = myDDGL.SaveChanges();
            if (i > 0)
            {
                return Json("true", JsonRequestBehavior.AllowGet);
            }
            else
            {
                return Json("false", JsonRequestBehavior.AllowGet);
            }
        }
        #endregion

第三步:视图层(Views)


2.1.2图(7)

出库订单界面效果截图:


2.1.2图(8)

HTML代码:

<!DOCTYPE html>
<html>
<head>
   <meta content="text/javascript;charset=utf-8"/>  //<head>标签里的是jQuery包的引用
      <link rel="stylesheet" type="text/css" href="../../Content/themes/jquery-easyui-1.3.3/themes/default/easyui.css"/>
	  <link rel="stylesheet" type="text/css" href="../../Content/themes/jquery-easyui-1.3.3/themes/icon.css"/>
	  <link rel="stylesheet" type="text/css" href="../../Content/themes/jquery-easyui-1.3.3/demo/demo.css"/>
	  <script type="text/javascript" src="../../Content/themes/jquery-easyui-1.3.3/jquery.min.js"></script>
 <script type="text/javascript" src="../../Content/themes/jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
</head>
<body>
<div class="easyui-tabs" style="border-style: none; margin-top: -18px; margin-left: -17px; margin-right: -18px;">
<div title="出 库 订 单">
      <div class="easyui-tabs" style="border-width: thick; border-style: none;">
          <div title="订单信息">
            <div class="easyui-panel" style="border-style: none; width:auto; height:auto; border-radius:15px 15px 0px 0px;">
              <table style="margin-left: 50px; margin-top: 10px;">
                  <tr>
                    <td align="right"><strong style="font-size: medium">订单号:</strong></td><td>
                      <input type="text" id="DingDanHao" style="border-style: hidden hidden outset hidden; border-width: thin; width:300px; height:30px; " /></td>
                    <td>   </td>
                    <td align="right"><strong style="font-size: medium">客户码:</strong></td><td>
                      <input type="text" id="KeHuMa" style="border-style: hidden hidden outset hidden; border-width: thin; width:300px; height:30px; " /></td>
                      <td><input type="button" οnclick="OpenKeHu()" value="••" style="font-size: 13px;width:30px;height:30px; font-family: 楷体; color: #000000; font-weight: bold;" /></td>
                   </tr>
                   <tr>
                    <td align="right"><strong style="font-size: medium">客户指令号:</strong></td><td>
                      <input type="text" id="KeHuZhiLingHao" style="border-style: hidden hidden outset hidden; border-width: thin; width:300px; height:30px; " /></td>
                    <td>   </td>
                    <td align="right"><strong style="font-size: medium">采购订单号:</strong></td><td>
                      <input type="text" id="CaiGouDanHao" style="border-style: hidden hidden outset hidden; border-width: thin; width:300px; height:30px; " /></td>
                   </tr>
                   <tr>
                    <td align="right"><strong style="font-size: medium">订单类型:</strong></td><td>
                      <input class="easyui-combobox" id="DingDanLeiXing" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
                    <td>   </td>
                    <td align="right"><strong style="font-size: medium">紧急程度:</strong></td><td>
                      <input class="easyui-combobox" id="JinJiChengDu" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
                   </tr>
                   <tr>
                    <td align="right"><strong style="font-size: medium">订单来源:</strong></td><td>
                      <input class="easyui-combobox" id="DingDanLaiYuan" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
                    <td>   </td>
                    <td align="right"><strong style="font-size: medium">下达时间:</strong></td><td>
                      <input class="easyui-datebox" id="XiaDaShiJian" data-options="formatter:myformatter" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
                   </tr>                                             //formatter属性在jQuery写方法代码,不然界面会出错
                   <tr>
                    <td align="right"><strong style="font-size: medium">状态:</strong></td><td>
                      <input class="easyui-combobox" id="ZhuangTai" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
                    <td>   </td>
                    <td align="right"><strong style="font-size: medium">执行状态:</strong></td><td>
                      <input class="easyui-combobox" id="ZhiXingZhuangTai" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
                   </tr>
                   <tr>
                    <td align="right"><strong style="font-size: medium">订单优先级:</strong></td><td>
                      <input type="text" id="DingDanYouXianJi" style="border-style: hidden hidden outset hidden; border-width: thin; width:300px; height:30px; " /></td>
                    <td>   </td>
                    <td align="right"><strong style="font-size: medium">质押银行:</strong></td><td>
                      <input type="text" id="ZhiYaYinHang" style="border-style: hidden hidden outset hidden; border-width: thin; width:300px; height:30px; " /></td>
                      <td><input type="button" οnclick="OpenZhiYaYinHang()" value="••" style="font-size: 13px;width:30px;height:30px; font-family: 楷体; color: #000000; font-weight: bold;" /></td>
                   </tr>
                </table>
                <table style="margin-left: 50px; margin-top: 10px;">
                   <tr>
                    <td align="right"><strong style="font-size: medium">备注:</strong></td><td>
                      <input type="text" id="BeiZhu" style="border-style: hidden hidden outset hidden; border-width: thin; width:500px; height:30px; " /></td>
                   </tr>
                </table>
            </div>
          </div>
          <div title="订单出库信息">
            <div class="easyui-panel" style="border-style: none; width:auto; height:auto; border-radius:15px 15px 0px 0px;">
              <table style="margin-left: 50px; margin-top: 10px;">
                   <tr>
                    <td align="right"><strong style="font-size: medium">库房:</strong></td><td>
                      <input type="text" id="KuFang" style="border-style: hidden hidden outset hidden; border-width: thin; width:300px; height:30px; " /></td>
                      <td><input type="button" οnclick="OpenKuFang()" value="••" style="font-size: 13px;width:30px;height:30px; font-family: 楷体; color: #000000; font-weight: bold;" /></td>
                    <td align="right"><strong style="font-size: medium">出库类型:</strong></td><td>
                      <input class="easyui-combobox" id="cboChuKuLeiXing" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>   
                   </tr>
                   <tr>
                    <td align="right"><strong style="font-size: medium">出库方式:</strong></td><td>
                      <input class="easyui-combobox" data-options="onSelect:OpenDistributionInformation"  id="cboChuKuFangShi" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
                    <td>   </td>
                    <td align="right"><strong style="font-size: medium">预计出库时间:</strong></td><td>
                      <input class="easyui-datebox" id="datYuJiChuKuShiJian" data-options="formatter:myformatter" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
                   </tr>
                </table>
                <table style="margin-left: 50px; margin-top: 10px;">
                   <tr>
                    <td align="right"><strong style="font-size: medium">备注:</strong></td><td>
                      <input type="text" id="txtChuKuBeiZhu" style="border-style: hidden hidden outset hidden; border-width: thin; width:500px; height:30px; " /></td>
                   </tr>
                </table>
      <div class="easyui-panel" id="PeiSiongXinXi" title="配送信息" style="border-style: none; width:auto; height:auto;"data-options="closed:true">
        <table style="margin-left: 20px; margin-top: 10px;">
           <tr>
             <td align="right"><strong style="font-size: medium">配送区域:</strong></td>
             <td><input class="easyui-combobox" id="cboPeiSiongQuYu" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td>
           </tr>
        </table>
        <table style="margin-left: 20px; margin-top: 10px;">
           <tr>
            <td align="right"><strong style="font-size: medium">收货单位:</strong></td><td>
                <input type="text" id="txtshouhuodanwei" style="border-style: hidden hidden outset hidden; border-width: thin; width:550px; height:30px; " /></td>
            <td><input type="button" οnclick="OpenShouHuoDanWei()" value="••" style="font-size: 13px;width:30px;height:30px; font-family: 楷体; color: #000000; font-weight: bold;" /></td>
           </tr>
        </table>
        <table style="margin-left: 20px; margin-top: 10px;">
           <tr>
            <td align="right"><strong style="font-size: medium">到达地址:</strong></td><td>
                <input type="text" id="txtdaodadizhi" style="border-style: hidden hidden outset hidden; border-width: thin; width:400px; height:30px; " /></td>
           </tr>
        </table>
        <table style="margin-left: 20px; margin-top: 10px;">
           <tr>
             <td align="right"><strong style="font-size: medium">联系人:</strong></td>
             <td><input type="text" id="txtlianxiren" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
             <td align="right"><strong style="font-size: medium">联系电话:</strong></td>
             <td><input type="text" id="txtlianxidianhua" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
             <td align="right"><strong style="font-size: medium">传真:</strong></td>
             <td><input type="text" id="txtchuangzhen" style="border-style: hidden hidden outset hidden; border-width: thin; width:150px; height:30px; " /></td>
           </tr>
        </table>
        <table style="margin-left: 20px; margin-top: 10px;">
          <tr>
            <td><strong style="font-size: medium">付款方式:</strong></td>
            <td><input type="radio" id="DaoFu" name="FK" /></td><td><strong style="font-size: medium">到付</strong></td>
            <td><input type="radio" id="QianFang" name="FK" /></td><td><strong style="font-size: medium">欠返</strong></td>
            <td><input type="radio" id="XianFu" name="FK" /></td><td><strong style="font-size: medium">现付</strong></td>
            <td><input type="radio" id="YueJie" name="FK" /></td><td><strong style="font-size: medium">月结</strong></td>
            <td>   </td>
            <td><strong style="font-size: medium">预付金额:</strong></td>
            <td><input type="text" id="yufujine" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td>
          </tr>
       </table>
       <table style="margin-left: 20px; margin-top: 5px;">
          <tr>
             <td align="right"><strong style="font-size: medium">运费:</strong></td><td>
                <input type="text" id="txtYunFei" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
             <td>   </td>
             <td align="right"><strong style="font-size: medium">保险费:</strong></td><td>
                <input type="text" id="txtBaoXianFei" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
           </tr>
           <tr>
             <td align="right"><strong style="font-size: medium">其他费用:</strong></td><td>
                <input type="text" id="txtQiTaFei" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
             <td>   </td>
             <td align="right"><strong style="font-size: medium">投保金额:</strong></td><td>
                <input type="text" id="txtTouBao" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
           </tr>
           <tr>
             <td align="right"><strong style="font-size: medium">总金额:</strong></td><td>
                <input type="text" id="txtZongJinE" οnclick="PeiSongZongJinE()" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
           </tr>
        <table style="margin-left: 20px; margin-top: 10px;">
           <tr>
             <td align="right"><strong style="font-size: medium">应收费用备注:</strong></td><td>
                <input type="text" id="txtYingShouFeiYongBeiZhu" style="border-style: hidden hidden outset hidden; border-width: thin; width:400px; height:30px; " /></td> 
           </tr>
        </table>
        </table>
        <form style="margin-left: 20px; margin-top: 10px;">
          <strong style="font-size: medium">运输方式:</strong>
          <input type="radio" name="FS" id="zhengChe" /><strong style="font-size: medium">公路整车</strong>
          <input type="radio" name="FS" id="lingDan" /><strong style="font-size: medium">公路零担</strong>
          <input type="radio" name="FS" id="peiSong" /><strong style="font-size: medium">货物配送</strong>
          <input type="radio" name="FS" id="tieLu" /><strong style="font-size: medium">铁路</strong>
          <input type="radio" name="FS" id="kongYun" /><strong style="font-size: medium">空运</strong>
        </form>
        <table style="margin-left: 20px; margin-top: 10px;">
           <tr>
            <td align="right"><strong style="font-size: medium">配送时间:</strong></td>
            <td><input class="easyui-datebox" id="peisiongshijain" data-options="formatter:myformatter" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td>
            <td>   </td>
            <td align="right"><strong style="font-size: medium">到货时间:</strong></td>
            <td><input class="easyui-datebox" id="daohuoshijian" data-options="formatter:myformatter" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td>
           </tr>
        </table>
        <table style="margin-left: 50px; margin-top: 10px;">
           <tr>
             <td align="right"><strong style="font-size: medium">车型:</strong></td>
             <td><input class="easyui-combobox" id="cbochexing" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td>
           </tr>
        </table>
        <table style="margin-left: 50px; margin-top: 10px;">
           <tr>
             <td align="right"><strong style="font-size: medium">备注:</strong></td>
             <td><input type="text" id="beizhu" style="border-style: hidden hidden outset hidden; border-width: thin; width:550px; height:30px; " /></td>
           </tr>
        </table>
      </div>
      <div class="easyui-panel" id="YunShuXinXi" title="运输信息" style="border-style: none; width:auto; height:auto;"data-options="closed:true">
        <table style="margin-left: 50px; margin-top: 10px;">
           <tr>
            <td align="right"><strong style="font-size: medium">起始地:</strong></td><td>
                <input type="text" id="QiShidi" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td>
            <td><input type="button" οnclick="OpenQiShiDi()" value="••" style="font-size: 13px;width:30px;height:30px; font-family: 楷体; color: #000000; font-weight: bold;" /></td>
            <td align="right"><strong style="font-size: medium">到达地:</strong></td><td>
                <input type="text" id="DaoDaDi" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
            <td><input type="button" οnclick="OpenMuDiDi()" value="••" style="font-size: 13px;width:30px;height:30px; font-family: 楷体; color: #000000; font-weight: bold;" /></td>
           </tr>
           <tr>
             <td align="right"><strong style="font-size: medium">起运地址:</strong></td>
             <td><input type="text" id="QiYunDiZhi" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td>
             <td>   </td>
            <td align="right"><strong style="font-size: medium">传真:</strong></td><td>
                <input type="text" id="ChuangZhen" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
           </tr>
           <tr>
            <td align="right"><strong style="font-size: medium">联系人姓名:</strong></td><td>
                <input type="text" id="XingMing" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td>
            <td>   </td>
            <td align="right"><strong style="font-size: medium">联系人电话:</strong></td><td>
                <input type="text" id="DianHua" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
           </tr>
        </table>
        <table style="margin-left: 50px; margin-top: 10px;">
           <tr>
             <td align="right"><strong style="font-size: medium">收货单位:</strong></td>
             <td><input type="text" id="DanWei" style="border-style: hidden hidden outset hidden; border-width: thin; width:550px; height:30px; " /></td>
             <td><input type="button" οnclick="OpenShouHuoDanWei()" value="••" style="font-size: 13px;width:30px;height:30px; font-family: 楷体; color: #000000; font-weight: bold;" /></td>
           </tr>
        </table>
        <table style="margin-left: 50px; margin-top: 10px;">
           <tr>
            <td align="right"><strong style="font-size: medium">联系人地址:</strong></td><td>
                <input type="text" id="DiZhi" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td>
            <td>   </td>
            <td align="right"><strong style="font-size: medium">到达库房:</strong></td><td>
                <input type="text" id="DaoDakufang" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
            <td><input type="button" οnclick="OpenDaoDaKuFang()" value="••" style="font-size: 13px;width:30px;height:30px; font-family: 楷体; color: #000000; font-weight: bold;" /></td>
           </tr>
        </table>
        <form style="margin-left: 50px; margin-top: 10px;">
          <strong style="font-size: medium">运输方式:</strong>
          <input type="radio" name="FS" id="GLZhengChe" value="ZhengChe" /><strong style="font-size: medium">公路整车</strong>
          <input type="radio" name="FS" id="GLLingDan" value="LingDan" /><strong style="font-size: medium">公路零担</strong>
          <input type="radio" name="FS" id="GPPeiSong" value="PeiSong" /><strong style="font-size: medium">货物配送</strong>
          <input type="radio" name="FS" id="tielu" value="TieLu" /><strong style="font-size: medium">铁路</strong>
          <input type="radio" name="FS" id="kongyun" value="KongYun" /><strong style="font-size: medium">空运</strong>
        </form>
        <table style="margin-left: 50px; margin-top: 10px;">
           <tr>
            <td align="right"><strong style="font-size: medium">起运时间:</strong></td><td>
                <input class="easyui-datebox" id="QiYunShiJian" data-options="formatter:myformatter" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td>
            <td>   </td>
            <td align="right"><strong style="font-size: medium">预计到达时间:</strong></td><td>
                <input class="easyui-datebox" id="YuJIShiJian" data-options="formatter:myformatter" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
           </tr>
        </table>
        <table style="margin-left: 50px; margin-top: 10px;">
           <tr>
             <td align="right"><strong style="font-size: medium">备注:</strong></td><td>
                <input type="text" id="BZ" style="border-style: hidden hidden outset hidden; border-width: thin; width:550px; height:30px; " /></td> 
           </tr>
        </table>
        <table style="margin-left: 50px; margin-top: 10px;">
           <tr>
             <td align="right"><strong style="font-size: medium">运费:</strong></td><td>
                <input type="text" id="yunfei" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
             <td>   </td>
             <td align="right"><strong style="font-size: medium">保险费:</strong></td><td>
                <input type="text" id="baoxianFei" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
           </tr>
           <tr>
             <td align="right"><strong style="font-size: medium">其他费用:</strong></td><td>
                <input type="text" id="QiTafei" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
             <td>   </td>
             <td align="right"><strong style="font-size: medium">投保金额:</strong></td><td>
                <input type="text" id="Toubao" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
           </tr>
           <tr>
             <td align="right"><strong style="font-size: medium">总金额:</strong></td><td>
                <input type="text" id="Zongjine" οnclick="ZongJinE()" style="border-style: hidden hidden outset hidden; border-width: thin; width:200px; height:30px; " /></td> 
           </tr>
        </table>
    </div>
            </div>
          </div>
          <div title="订单货品">
            <div class="easyui-panel" style="border-style: none; width:auto; height:auto; border-radius:15px 15px 0px 0px;">
              <table>
                  <tr>
                    <td><input type="button" οnclick="SelectChuKuGoodsTable()" value="添加货品" style="font-size: 18px;width:100px; font-family: 楷体; color: #CC33FF" /></td>
                    <td><input type="checkbox" id="ckPiLiang" /></td><td><strong style="font-size: medium">批量</strong></td>
                  </tr>
                </table>
              <table id="tb出库订单货品" class="easyui-datagrid" style="width:auto; height:200px;" data-options="singleSelect:true,scrolling:true,
                                                                                                   onClickRow:onClickRowQiYongEdit,onAfterEdit:onChuKuAfterEdit">
                  <thead>
                    <tr>
                     <th data-options="field:'GoodsID',width:50,align:'center',formatter:returnBtnCK"><img src="../../Content/图片/删除.jpg" /></th>
                     <th data-options="field:'GoodsCoding',width:100,align:'center'">货品编码</th>
                     <th data-options="field:'GoodsName',width:100,editor:'true',align:'center'">货品名称</th>
                     <th data-options="field:'Standard',width:100,editor:'true',align:'center'">规格</th>
                     <th data-options="field:'Batch',width:100,editor:'numberbox',align:'center'">批次</th>
                     <th data-options="field:'Unit',width:100,editor:'combobox',align:'center'">单位</th>
                     <th data-options="field:'Quality',width:100,editor:'combobox',align:'center'">质量</th>           
                     <th data-options="field:'Quantity',width:100,editor:'numberbox',align:'center'">数量</th>
                     <th data-options="field:'Note',width:100,editor:'text',align:'center'">备注</th>
                    </tr>
                  </thead>
                </table>
                <table id="tb出库货品信息" class="easyui-datagrid" style="width:auto; height:200px;" data-options="singleSelect:true,scrolling:true,onDblClickRow:DblChuKuHuoPinDatagrid">
                  <thead>
                    <tr>
                     <th data-options="field:'GoodsID',width:100,hidden:true,align:'center'">货品ID</th>
                     <th data-options="field:'GoodsCoding',width:100,align:'center'">货品编码</th>
                     <th data-options="field:'GoodsName',width:100,align:'center'">货品名称</th>
                     <th data-options="field:'BarCode',width:100,align:'center'">条形码</th>
                     <th data-options="field:'SpellCode',width:100,align:'center'">拼音码</th>
                     <th data-options="field:'Standard',width:100,align:'center'">规格</th>
                     <th data-options="field:'UnitID',width:100,hidden:true,align:'center'">单位ID</th>
                     <th data-options="field:'Unit',width:100,align:'center'">单位</th>
                     <th data-options="field:'QualityID',width:100,hidden:true,align:'center'">质量ID</th>
                     <th data-options="field:'Quality',width:100,align:'center'">质量</th>           
                     <th data-options="field:'Weight',width:100,align:'center'">重量</th>
                    </tr>
                  </thead>
                </table>
            </div>
          </div>
        </div>
        <table style="margin-left: 450px;">
            <tr>
                <td><input type="button" οnclick="ChuKuInsertOrdersInformationTable()" value="保存订单" style="font-size: 18px;width:100px; font-family: 楷体; color: #CC33FF" /></td>
            </tr>
        </table>
</div>
</div>
</body>
</html>

jQuery代码:

<script type="text/javascript">
    $(document).ready(function () {
        cboBinDing();//HTML加载时,预先执行下拉框绑定方法
});
    function returnBtnCK(GoodsID, row, rowIndex) {
        return "<a href='javascript:CKShanChu(" + GoodsID + "," + rowIndex + ")'>" + '<img src="../../Content/图片/删除.jpg" />' + "</a>";
    }//订单货品数据表格datagrid里添加删除按钮,点击删除图标执行下面删除方法
    function CKShanChu(GoodsID, rowIndex) { //删除出库明细
        $('#tb出库订单货品').datagrid('cancelEdit', editIndex).datagrid('deleteRow', editIndex);
    }
function cboBinDing() {    //出库订单各种下拉框的绑定
$.getJSON("/DingDanLuRu/cboBinDing?AttributeAssembleID=22",
           function (data) {
               $("#DingDanLeiXing").combobox({ data: data, valueField: 'AttributeDetailedID',
                   textField: 'AttributeDetailedName'
               });
               $("#DingDanLeiXing").combobox('select', 83); //默认选项
           });
           $.getJSON("/DingDanLuRu/cboBinDing?AttributeAssembleID=23",
           function (data) {
               $("#JinJiChengDu").combobox({ data: data, valueField: 'AttributeDetailedID',
                   textField: 'AttributeDetailedName'
               });
           });
           $.getJSON("/DingDanLuRu/cboBinDing?AttributeAssembleID=24",
           function (data) {
               $("#DingDanLaiYuan").combobox({ data: data, valueField: 'AttributeDetailedID',
                   textField: 'AttributeDetailedName'
               });
           });
           $.getJSON("/DingDanLuRu/cboBinDing?AttributeAssembleID=4",
           function (data) {
               $("#ZhuangTai").combobox({ data: data, valueField: 'AttributeDetailedID',
                   textField: 'AttributeDetailedName'
               });
           });
           $.getJSON("/DingDanLuRu/cboBinDing?AttributeAssembleID=25",
           function (data) {
               $("#ZhiXingZhuangTai").combobox({ data: data, valueField: 'AttributeDetailedID',
                   textField: 'AttributeDetailedName'
               });
           });
           $.getJSON("/DingDanLuRu/cboBinDing?AttributeAssembleID=28",
           function (data) {
               $("#cboChuKuLeiXing").combobox({ data: data, valueField: 'AttributeDetailedID',
                   textField: 'AttributeDetailedName'
               });
           });
           $.getJSON("/DingDanLuRu/cboBinDing?AttributeAssembleID=29",
           function (data) {
               $("#cboChuKuFangShi").combobox({ data: data, valueField: 'AttributeDetailedID',
                   textField: 'AttributeDetailedName'
               });
           });
           $.getJSON("/DingDanLuRu/cboBinDing?AttributeAssembleID=12",  //车辆类型绑定
           function (data) {
               $("#cbochexing").combobox({ data: data, valueField: 'AttributeDetailedID',
                   textField: 'AttributeDetailedName'
               });
           });
           $.getJSON("/DingDanLuRu/cboAreaTable",   //区域绑定
           function (data) {
               $("#cboPeiSiongQuYu").combobox({ data: data, valueField: 'AreaID',
                   textField: 'AreaName'
               });
           });
           $.getJSON("/DingDanLuRu/cboBinDing?AttributeAssembleID=32",  //业务类型绑定
           function (data) {
               $("#cboYWLX").combobox({ data: data, valueField: 'AttributeDetailedID',
                   textField: 'AttributeDetailedName'
               });
           });
           $.getJSON("/DingDanLuRu/SelectProjectTable",  //项目
           function (data) {
               $("#cboXMMC").combobox({ data: data, valueField: 'ProjectID',
                   textField: 'ProjectName'
               });
           });
}
//定义一个全局变量,并把它赋值为未定义
       var editIndex = undefined;
       //启用单元格编辑状态
       function onClickRowQiYongEdit(index) {
           if (editIndex != index) {
               $('#tb出库订单货品').datagrid('beginEdit', index);
               $('#tb出库订单货品').datagrid('endEdit', editIndex);
               editIndex = index;
           }
       }
      function SelectChuKuGoodsTable() {  //出库时单击添加,查询货品
          $("#tb出库货品信息").datagrid({ url: "/DingDanLuRu/SelectGoodsTable" });
      }
      function DblChuKuHuoPinDatagrid() {  //双击事件,将待出库货品信息更新到出库订单货品列表
          var rowHuoPinDatagrid = $('#tb出库货品信息').datagrid('getSelected');
          var rowMingXi = $('#tb出库订单货品').datagrid('getSelected');
          $('#tb出库订单货品').datagrid('appendRow',
                                        { GoodsID: rowHuoPinDatagrid.GoodsID,
                                            GoodsCoding: rowHuoPinDatagrid.GoodsCoding,
                                            GoodsName: rowHuoPinDatagrid.GoodsName,
                                            Standard: rowHuoPinDatagrid.Standard,
                                            Batch: "0.00",
                                            UnitID: rowHuoPinDatagrid.UnitID,
                                            Unit: rowHuoPinDatagrid.Unit,
                                            QualityID: rowHuoPinDatagrid.QualityID,
                                            Quality: rowHuoPinDatagrid.Quality,
                                            Quantity: "0.00"
                                        });
                                        editIndex = $('#tb出库订单货品').datagrid('getRows').length - 1;
                                        $('#tb出库订单货品').datagrid('selectRow', editIndex);
               $('#tb出库订单货品').datagrid('beginEdit', editIndex).datagrid('endEdit', editIndex - 1);
      }
      function onChuKuAfterEdit(rowIndex, rowData, changes) { //当用户编辑完成时触发事件,获取编辑行的数据,再返回改变显示值
          var dataMingXi = $('#tb出库订单货品').datagrid('getData');
          var Batch = dataMingXi.rows[rowIndex].Batch;
          var Quantity = dataMingXi.rows[rowIndex].Quantity;
          var Note = dataMingXi.rows[rowIndex].Note;
          $('#tb出库订单货品').datagrid('refreshRow', rowIndex); //refreshRow:刷新一行
      }

var OrdersInformationID = 0; //声明全局变量
      function ChuKuInsertOrdersInformationTable() { //新增订单信息
          if (confirm("是否添加?")) {
              $.getJSON("/DingDanLuRu/InsertOrdersInformationTable?OrdersMark=" + $('#DingDanHao').val() +
                                                 "&ClientID=" + ClientID +
                                                 "&ClientInstructMark=" + $('#KeHuZhiLingHao').val() +
                                                "&PurchaseOrdersNumber=" + $('#CaiGouDanHao').val() +
                                                "&OrdersTypeID=" + $('#DingDanLeiXing').combobox('getValue') +
                                               "&UrgencyDegreeID=" + $('#JinJiChengDu').combobox('getValue') +
                                              "&OrdersSourceID=" + $('#DingDanLaiYuan').combobox('getValue') +
                                             "&OrderTime=" + $('#XiaDaShiJian').datebox('getValue') +
                                                 "&StateID=" + $('#ZhuangTai').combobox('getValue') +
                                            "&ExecuteStateID=" + $('#ZhiXingZhuangTai').combobox('getValue') +
                                           "&OrdersPriorLevel=" + $('#DingDanYouXianJi').val() +
                                                 "&PledgeBankID=" + BankID +
                                                "&Note=" + $('#BeiZhu').val() +
                                                    "&EntryTime=" + EntryTime,
                                                    function (data) {
                                               OrdersInformationID = data; //订单信息新增完成,返回最新主键ID
                                                     if (data != null) {
InsertOrdersOutboundInformationTable();//执行新增出库订单信息方法                                                           
} else {
                                                                alert("添加失败!");
                                                      }
                                          });
          } else {
              return null;
          }
      }
      var OrdersOutboundInformationID = 0;//新增完成,返回主键ID
      function InsertOrdersOutboundInformationTable() {   //新增出库订单信息
              $.getJSON("/DingDanLuRu/InsertOrdersOutboundInformationTable?OrdersInformationID=" + OrdersInformationID +
                                    "&StoreroomID=" + StoreroomID +
                                    "&OutboundTypeID=" + $('#cboChuKuLeiXing').combobox('getValue') +
                                    "&OutboundWayID=" + $('#cboChuKuFangShi').combobox('getValue') +
                                   "&EstimatedOutboundTime=" + $('#datYuJiChuKuShiJian').datebox('getValue') +
                                    "&Note=" + $('#txtChuKuBeiZhu').val(),
                                     function (data) {
                                          OrdersOutboundInformationID = data; //新增完成,返回最新主键ID
                                                  if (data != null) {
                                                     if ($('#cboChuKuFangShi').combobox('getValue') == 104) {
                                                     ChuKuIserctTransportationInformation();  //出库时,出库方式选择仓运时执行,新增运输信息                                             
                                                    InsertOrdersOutboundDetailedTable(); //执行新增出库订单货品方法
                                                    alert("添加成功!");                                      
                                                    $('#YunShuXinXi').panel('close');   //完成后关闭运输信息窗口
                                       } else if ($('#cboChuKuFangShi').combobox('getValue') == 105) {
                                           InsertDistributionInformation();  //出库时,出库方式选择仓配时执行,新增配送信息
                                           InsertOrdersOutboundDetailedTable();//执行新增出库订单货品方法
                                                   alert("添加成功!");             
                                                  $('#PeiSiongXinXi').panel('close');  //完成后关闭配送信息窗口
                                        } else {  //前面两者条件都不满足时,单单执行新增出库订单货品方法
                                          InsertOrdersOutboundDetailedTable();
                                                 alert("添加成功!");
                                                         }               
                                                      } else {
                                                        alert("添加失败!");
                                                 }
                                   });
      }
      function InsertOrdersOutboundDetailedTable() {  //新增出库订单明细
              var dataMingXi = $('#tb出库订单货品').datagrid('getData'); //获取数据表格datagrid里的所有数据
              for (var i = 0; i < dataMingXi.rows.length; i++) {
                  $.getJSON("/DingDanLuRu/InsertOrdersOutboundDetailedTable?OrdersOutboundInformationID=" + OrdersOutboundInformationID +
                                                   "&GoodsID=" + dataMingXi.rows[i].GoodsID +
                                                       "&Batch=" + dataMingXi.rows[i].Batch +
                                                        "&Quantity=" + dataMingXi.rows[i].Quantity +
                                                        "&Note=" + dataMingXi.rows[i].Note,
                                                              function (data) {
                                                                       if (data == "false") {
                                                                           alert("新增失败!");
                                                                       }
                                                                   });
              }
      }
      function PeiSongZongJinE() { //配送信息界面,计算配送的总金额
          var Freight = parseInt($('#txtYunFei').val());
          var InsureFee = parseInt($('#txtBaoXianFei').val());
          var OtherCost = parseInt($('#txtQiTaFei').val());
          var InsureMoney = parseInt($('#txtTouBao').val());
          var ZongJinE = Freight + InsureFee + OtherCost + InsureMoney;
          $('#txtZongJinE').val(ZongJinE);
      }
      function ZongJinE() {   //运输界面,运输总金额合计
          var Freight = parseInt($('#yunfei').val());
          var InsureFee = parseInt($('#baoxianFei').val());
          var OtherCost = parseInt($('#QiTafei').val());
          var InsureMoney = parseInt($('#Toubao').val());
          var ZongJinE = Freight + InsureFee + OtherCost + InsureMoney;
          $('#Zongjine').val(ZongJinE);
      }
function ChuKuIserctTransportationInformation() {    //出库方式选择“仓提”时,新增仓提运输信息
          if (document.getElementById("GLZhengChe").checked) {  //单选框的判断
              TransportationWayID = 62;
          } else if (document.getElementById("GLLingDan").checked) {
              TransportationWayID = 63;
          } else if (document.getElementById("GPPeiSong").checked) {
              TransportationWayID = 64;
          } else if (document.getElementById("tielu").checked) {
              TransportationWayID = 65;
          } else if (document.getElementById("kongyun").checked) {
              TransportationWayID = 66;
          }
          $.getJSON("/DingDanLuRu/IserctTransportationInformation?OrdersOutboundInformationID=" + OrdersOutboundInformationID +
                                           "&RiseCarryLandID=" + QiShiDiID +
                                           "&ArriveLandID=" + MuDiDiID +
                                            "&RiseCarryAddress=" + $('#QiYunDiZhi').val() +
                                             "&LinkmanName=" + $('#XingMing').val() +
                                             "&LinkmanPhone=" + $('#DianHua').val() +
                                            "&GoodsUnitID=" + Clientid +
                                             "&LinkmanAddress=" + $('#DiZhi').val() +
                                              "&StoreroomID=" + DaoDaStoreroomID +
                                              "&TransportationWayID=" + TransportationWayID +
                                             "&ShipmentTime=" + $('#QiYunShiJian').datebox('getValue') +
                                            "&EstimatedArriveTime=" + $('#YuJIShiJian').datebox('getValue') +
                                              "&Note=" + $('#BZ').val() +
                                              "&Freight=" + $('#yunfei').val() +
                                               "&InsureFee=" + $('#baoxianFei').val() +
                                               "&OtherCost=" + $('#QiTafei').val() +
                                                 "&InsureMoney=" + $('#Toubao').val() +
                                                "&Fax=" + $('#ChuangZhen').val(),
                                                      function (data) {
                                                           if (data == "true") {
                                                                  } else {
                                                                      alert("添加失败!");
                                                             }
                                                  });
      }
      function InsertDistributionInformation() {    //出库方式选择“仓配”,新增配送信息
      try{
          if (document.getElementById("DaoFu").checked) { //单选框的判断
                  PaymentWayID = 106;
              } else if (document.getElementById("QianFang").checked) {
                  PaymentWayID = 107;
              } else if (document.getElementById("XianFu").checked) {
                  PaymentWayID = 108;
              } else if (document.getElementById("YueJie").checked) {
                  PaymentWayID = 109;
              }
              if (document.getElementById("zhengChe").checked) {
                  ServeWayID = 110;
              } else if (document.getElementById("lingDan").checked) {
                  ServeWayID = 111;
              } else if (document.getElementById("peiSong").checked) {
                  ServeWayID = 112;
              } else if (document.getElementById("tieLu").checked) {
                  ServeWayID = 113;
              } else if (document.getElementById("kongYun").checked) {
                  ServeWayID = 114;
              }
      } catch (e) {
          return null;
      }
      $.getJSON("/DingDanLuRu/InsertDistributionInformation?OrdersOutboundInformationID=" + OrdersOutboundInformationID +
                                     "&DistributionAreaID=" + $('#cboPeiSiongQuYu').combobox('getValue') +
                                      "&IncomeCommodityUnitID=" + Clientid +
                                      "&ArriveAddress=" + $('#txtdaodadizhi').val() +
                                       "&Linkman=" + $('#txtlianxiren').val() +
                                       "&RelationPhone=" + $('#txtlianxidianhua').val() +
                                       "&Fax=" + $('#txtchuangzhen').val() +
                                      "&PaymentWayID=" + PaymentWayID +  //付款方式
                                       "&PrepaidMoney=" + $('#yufujine').val() +
                                        "&PrepaidMoney=" + $('#yufujine').val() +
                                      "&Freight=" + $('#txtYunFei').val() +
                                        "&InsureFee=" + $('#txtBaoXianFei').val() +
                                         "&OtherCost=" + $('#txtQiTaFei').val() +
                                          "&InsureMoney=" + $('#txtTouBao').val() +
                                         "&ReceivableCostNote=" + $('#txtYingShouFeiYongBeiZhu').val() +
                                         "&ServeWayID=" + ServeWayID +    //服务方式
                                        "&DistributionTime=" + $('#peisiongshijain').datebox('getValue') +
                                         "&ArriveGoodsTime=" + $('#daohuoshijian').combobox('getValue') +
                                          "&CarModelID=" + $('#cbochexing').combobox('getValue') +
                                                  "&Note=" + $('#beizhu').val(),
                                                  function (data) {
                                                      if (data == "true") {
                                                      } else {
                                                          alert("添加失败!");
                                                      }
                                                  });
      }

</script>
仅供学习,禁止用于商业用途


  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值