js 拖拽

1.js

 <script src="~/Content/js/jquery-ui.min.js"></script>
    <script src="~/Content/js/tableHeadFixer.js"></script>
    <script>
        //layer.tips('@lblDrag', '.tips');
        $(".filter_table tbody").sortable({
            placeholder: "ui-state-highlight",
            update: function () {
                //var i = 1;
                $(".filter_table tbody tr").each(function (i, n) {
                    $(this).find("td").eq(4).html(PrefixInteger(++i, 3));//将数字格式话为三位,如2 -> 002
                });
            }
        });
        $(".filter_table tbody").disableSelection();
        function PrefixInteger(num, length) {
            return (Array(length).join('0') + num).slice(-length);
        }
    </script>

2.使用

 <table class="filter_table mt fixTable">
                        <thead>
                            <tr>
                                <th>@lblLotId</th>
                                <th>@lblSubstrateId</th>
                                <th>@lblFrameId</th>
                                <th>@lblCstId</th>
                                <th>@lblSlotId</th>
                                <th>@lblStepId</th>
                                <th>@lblStepName</th>
                                <th>@lblLotStatus</th>
                                <th>@lblWorkOrderId</th>
                                <th>@lblWorkOrderType</th>
                                <th>@lblProdId</th>
                                <th>@lblProdName</th>
                                <th>@lblProdVer</th>
                                <th>@lblRouteId</th>
                                <th>@lblRouteName</th>
                                <th>@lblRouteVer</th>
                                <th>@lblCustomerId</th>
                                <th>@lblOperatorCode</th>
                                <th>@lblOperatorName</th>
                                <th class="time_w">@lblOperateTime</th>
                            </tr>
                        </thead>
                        <tbody id="tb_lot">
                            @{
                                foreach (var item in Model)
                                {
                                    var cst = csts.Where(x => x.cstSeq == item.cstSeq).FirstOrDefault();
                                    <tr data-cstseq="@item.cstSeq" data-lotseq="@item.lotSeq" data-substrateid="@item.substrateId" data-frameid="@item.frameId">
                                        <td>@item.lotId</td>
                                        <td>@item.substrateId</td>
                                        <td>@item.frameId</td>
                                        <td>@cst.cstId</td>
                                        <td>@item.cstSlot</td>
                                        @*<td><input type="text" name="cstSlot" value="@item.cstSlot"></td>*@
                                        <td>@item.stepId</td>
                                        <td>@item.stepName</td>
                                        <td>@item.lotStatus</td>
                                        <td>@item.workOrderId</td>
                                        <td>@item.workOrderType</td>
                                        <td>@item.prodId</td>
                                        <td>@item.prodName</td>
                                        <td>@(item.prodVer )</td>
                                        <td>@item.routeId</td>
                                        <td>@item.routeName</td>
                                        <td>@(item.routeVer )</td>
                                        <td>@item.customerId</td>
                                        <td>@item.trxUserId</td>
                                        <td>@item.trxUserName</td>
                                        <td>@item.trxTime</td>
                                        @*<td>@((item.trxTime==null||item.trxTime==DateTime.MinValue)?"":item.trxTime.ToString(ConfigurationKey.GetDateFormat))</td>*@
                                    </tr>
                                }
                            }
                        </tbody>
                    </table>

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值