• 拆单发货-分布页


    @model List<Hyt.Model.Api.OrderItem>
    
    <div class="caseout">
        <form id="OrderShipForm" name="OrderShipForm" action="">
            <div class="boxs_detail_dispay">
                <div class="tit_con">
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                            <tr>
                                <td></td>
                                <td class="border_rnone"></td>
                                <td class="nameright border_rnone">配送方式:</td>
                                <td class="borde_left">
                                    <div class="fl m10_l" style="margin-left: 0">
                                        <select name="status" id="fstatus" class="fl select_ht28 wd150" onchange="changeStatus();">
                                            <option value="1" selected="selected">全部发货:@ViewBag.deliveryTypeName</option>
                                            <option value="2">部分发货:请指定商品</option>
                                            @*<option value="3">321</option>*@
                                        </select>
                                    </div>
                                </td>
    
                            </tr>
                            <tr>
                                <td></td>
                                <td class="border_rnone"></td>
                                <td class="nameright border_rnone"><span class="v_star">*</span>快递单号:</td>
                                <td class="borde_left">
                                    <input type="text" name="expressNo" id="expressNo" class="wd150" value="" maxlength="100" /><span class="prompt m10_l" id="c_expressNo">填写快递单号</span>
                                </td>
    
                            </tr>
                            @{
                                foreach (var item in Model)
                                {
                                    var specStr = "";
                                    var productSysNo = Hyt.BLL.Supply.OrderBLL.Instance.GetProductSysNo(item.SysNo);
                                    var d = Hyt.DataAccess.Supply.IOrderDao.Instance.GetPdProductSpecPricessSysId(productSysNo);
                                    if (d != null)
                                    {
                                        var j = Newtonsoft.Json.Linq.JObject.Parse(d.SpecValue);
                                        try
                                        {
                                            specStr = j["PdProductSpecValues"]["spec"].ToString() + j["PdProductSpecValues"]["unit"].ToString();
                                        }
                                        catch (Exception)
                                        {
                                            specStr = j["PdProductSpecValues"][0]["spec"].ToString() + j["PdProductSpecValues"][0]["unit"].ToString();
                                        }
                                    }
                                    if (item.Quantity != item.RealStockOutQuantity)
                                    {
                                        <tr>
                                            <td>
                                                <input name="sysNo" type="checkbox" class="checktd" value="@item.SysNo">
                                            </td>
                                            <td style="30%" class="nameright border_rnone">@(item.ProductName)</td>
                                            <td style="13%" class="nameright border_rnone">@(specStr)</td>
                                            <td style="57%" class="borde_left">
                                                <input type="text" name="shopNO" class="shopNO pdCount" maxlength="999" value=" " />
                                                <input type="hidden" value="@item.SysNo" class="sysid" />
                                                <span class="prompt_qty m10_l">填写数量,最大<span class="v_star">@item.Quantity</span>件,已发 <span class="real">@item.RealStockOutQuantity</span>件</span>
                                            </td>
                                        </tr>
                                    }
                                }
                            }
                        </tbody>
                    </table>
                </div>
                <input type="hidden" id="soOrderSysNo" value="@ViewBag.soOrderSysNo" />
                <input type="hidden" id="deliveryTypeName" value="@ViewBag.deliveryTypeName" />
                <input type="hidden" id="TransactionSysNo" value="@ViewBag.deliveryTypeName" />
            </div>
    
        </form>
    </div>
    <script src="~/Theme/scripts/jquery.validate.yui.js"></script>
    <script>
        $(function () {
            //表单验证
            $("#OrderShipForm").validate({
                rules: {
                    expressNo: {
                        required: true,
                        maxlength: 100
                    }
                },
                messages: {
                    expressNo: {
                        required: "快递单号必填",
    
                        maxlength: "长度超出100个字"
                    }
                },
                errorPlacement: function (error, element) {
                    element.parent().find('.prompt').attr('class', 'prompt error m10_l').text($(error).text());
                },
                success: function (span, element) {
                    element.parent().find('.prompt').attr('class', 'prompt success m10_l').text('填写正确');
                }
            });
    
            //取可发数量
            $(".pdCount").each(function () {
                var count = $(this).next().next().children('.v_star').html();
                var realid = $(this).next().next().children(".v_star").next(".real").html();
                var qty = Number(count) - Number(realid);
                $(this).val(qty);
            });
            
            //全部发货禁用数量全选商品
            if ($("#fstatus option:selected").val() == 1){
                $('.shopNO').attr('readonly', true);
                //$('.checktd').checked = true;
            }
        });
    
        //获取发货方式
        vals = $('#fstatus option:selected').val();
        function changeStatus() {
            if ($("#fstatus option:selected").val() == 2) {
                $('.shopNO').attr('readonly', false);
                //$('.checktd').checked = false;
                
            } else {
                $('.shopNO').attr('readonly', true);
                
            }
            vals = $('#fstatus option:selected').val();
    
        }
    
    </script>
    奋斗
  • 相关阅读:
    给vs2012轻松换肤
    几种软件常用授权方式总结
    Discuz X2多人斗地主[消耗论坛积分]小体积版本,仅25MB!
    关于Socket 设置 IPAddress.Any 情况下,出现服务器积极拒绝的问题
    以前看过一个压缩过的.exe,运行会播放长达半小时的动画,却只有60KB,个人认为其中的原理
    VisualSvn Server安装和使用
    socket短时间内重连需注意的问题
    PostgreSQL在何处处理 sql查询之十一
    PostgreSQL在何处处理 sql查询之十三
    PostgreSQL在何处处理 sql查询之十四
  • 原文地址:https://www.cnblogs.com/aimerh/p/9176175.html
Copyright © 2020-2023  润新知