yzh
2022-05-19 318d349fc009011a135dbce5a25e392b492c0718
web/web/GwClient.aspx
@@ -72,8 +72,8 @@
                    $("#clientDialog #mmsStatusReport").val("");
                    $("#clientDialog #customerManager").val("");
                    $("#clientDialog #salesman").val("");
                    $("#clientDialog #supportStaff").val(r.Message.SupportStaff);
                    $("#clientDialog #financialStaff").val(r.Message.FinancialStaff);
                    $("#clientDialog #supportStaff").val("");
                    $("#clientDialog #financialStaff").val("");
                    $("#clientDialog #remark").val("");
                    $("#clientDialog input[name=permissionData]").iCheck("uncheck");
@@ -185,6 +185,60 @@
                    }
                });
            })
            //全选
            $("#checkAll").click(function () {
                $("input[name='checkbox']").prop("checked", $(this).is(":checked"));
            });
            //批量分配个性产品
            $(document).on("click", ".action-modal-setProduct", function () {
                var idArray = [];
                $("input[name='checkbox']:checkbox:checked").each(function () {
                    var id = $(this).val();
                    idArray.push(id);
                });
                if (idArray.length == 0) {
                    mytek.alert("请选择要分配个性产品的客户!", false);
                    return;
                }
                $("#selected-op-box").text(idArray.join(","));
                $("#setProductDialog").modal("show");
            });
            //批量分配客户个性产品--确认修改
            $(document).on("click", ".action-update-setProduct", function () {
                var idArray = [];
                $("input[name='checkbox']:checkbox:checked").each(function () {
                    var id = $(this).val();
                    idArray.push(id);
                });
                if (idArray.length == 0) {
                    mytek.alert("请选择要分配个性产品的客户!", false);
                    return;
                }
                var productId = $("#productId").val();
                $.ajax({
                    url: "GwClient.ashx",
                    method: "POST",
                    data: { idArray: $.toJSON(idArray), productId: productId, action: "batchUpdateClientProduct" },
                    success: function (result) {
                        mytek.alert(result.Message, result.OK, function () {
                            $("#setProductDialog #productId").val("");
                            $("#setProductDialog").modal("hide");
                            loadPageList();
                        });
                    }
                });
            });
@@ -495,7 +549,8 @@
        <div class="form-group">
            <div class="input-group m-b">
                <input type="button" value="查询" class="btn btn-primary action-query" />&nbsp
            <input class="btn btn-success action-modal-create" value="创建客户" type="button" />
            <input class="btn btn-success action-modal-create" value="创建客户" type="button" />&nbsp
            <input class="btn btn-danger action-modal-setProduct" value="批量分配个性产品" type="button" />
            </div>
        </div>
@@ -505,6 +560,9 @@
        <table class="table table-striped table-bordered table-hover" id="gwclientTable">
            <thead>
                <tr class="header">
                    <th>
                        <input type='checkbox' name='checkAll' id='checkAll' />
                    </th>
                    <th>客户账号
                    </th>
                    <th>公司名称</th>
@@ -533,6 +591,36 @@
    <div id="pager">
    </div>
    <div class="modal inmodal fade" id="setProductDialog" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog form-horizontal">
            <div class="modal-content animated ">
                <div class="modal-header">
                    <h3>
                        批量分配个性产品</h3>
                    </span><a class="close" data-dismiss="modal" aria-hidden="true">×</a> <span class="text-muted">
                        批量分配个性产品将会更新所有选中的账号的客户,<br />
                        确定分配不能取消,请谨慎操作!<br />
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">
                            个性产品
                        </label>
                        <div class="col-sm-10">
                            <select name="productId" id="productId" class="form-control">
                                 <%=GetPersonalityProductOptions("")%>
                              </select>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button class="btn-default btn" data-dismiss="modal" aria-hidden="true">
                        取消</button>&nbsp;&nbsp;
                    <input class="btn btn-primary action-update-setProduct" value="确定修改" type="button" />
                </div>
            </div>
        </div>
</asp:Content>