| | |
| | | |
| | | function loadPageList() { |
| | | var name = $("#Name").val(); |
| | | var classes = $("#Classes").val(); |
| | | //var classes = $("#Classes").val(); |
| | | var classes = 1; |
| | | $.ajax({ |
| | | url: "GwProduct.ashx", |
| | | type: "POST", |
| | |
| | | } |
| | | |
| | | $(document).on("click", ".action-modal-add", function() { |
| | | $("#productDialog .modal-title").text("添加产品或产品分类"); |
| | | $("#productDialog .modal-title").text("添加产品"); |
| | | $("#productDialog #action").val("add"); |
| | | $("#productDialog #id").val("").attr("readonly", false); |
| | | $("#productDialog #name").val(""); |
| | | $("#productDialog #icon").val(""); |
| | | $("#productDialog #instructions").val(""); |
| | | $("#productDialog #classes").val(""); |
| | | //$("#productDialog #classes").val(""); |
| | | $("#productDialog #parentId").val(""); |
| | | //$("#productDialog #path").val(""); |
| | | $("#productDialog #isDefault").val(""); |
| | | //$("#productDialog #isDefault").val(""); |
| | | $("#productDialog #isDnable").val(1); |
| | | $("#productDialog #sort").val(1); |
| | | $("#productDialog #routerType").val(1); |
| | |
| | | } |
| | | }); |
| | | |
| | | //选择图标下拉框 |
| | | $("#icon").on("change", function () { |
| | | console.log("icon:" + $(this).val()); |
| | | if ($(this).val() != "") { |
| | | document.getElementById('showImg').src = "../static/images/productIcon/" + $(this).val(); |
| | | } |
| | | }); |
| | | |
| | | $("#icon").trigger("change"); |
| | | |
| | | //选择类别下拉框,控制相关输入项显示 |
| | | $("#classes").on("change", function () { |
| | | $(".classes-span").hide(); |
| | |
| | | $("#classes").trigger("change"); |
| | | |
| | | //选择路由类型下拉框,控制相关输入项显示 |
| | | $("#RouterType").on("change", function () { |
| | | $("#routerType").on("change", function () { |
| | | $(".router-type-span").hide(); |
| | | $(".router-type-span-" + $(this).val()).show(); |
| | | }); |
| | | |
| | | $("#RouterType").trigger("change"); |
| | | $("#routerType").trigger("change"); |
| | | |
| | | $(document).on("click", ".action-modal-edit", function() { |
| | | var id = $(this).data("id"); |
| | | $("#productDialog .modal-title").text("编辑产品或产品分类"); |
| | | $("#productDialog .modal-title").text("编辑产品"); |
| | | $("#productDialog #id").val(id).attr("readonly", true); |
| | | |
| | | $.get("gwProduct.ashx", { "action": "get", id: id }, function(r) { |
| | |
| | | |
| | | } |
| | | |
| | | //设置类别 |
| | | $("#classes").trigger("change"); |
| | | |
| | | //设置路由 |
| | | $("#routerType").trigger("change"); |
| | | |
| | | //设置图标 |
| | | $("#icon").trigger("change"); |
| | | |
| | | $("#productDialog").modal("show"); |
| | | } |
| | |
| | | //data的属性参数不能含有大写字母。 |
| | | var id = $(this).data("id"); |
| | | var isEnable = $(this).data("is_enable"); |
| | | $.post("gwProduct.ashx", { "action": "updateStatus", id: id, isEnable: isEnable }, function (r) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | loadPageList(); |
| | | }); |
| | | var statusStr = ""; |
| | | if (isEnable == 0) { |
| | | statusStr = "【停用】"; |
| | | } |
| | | else { |
| | | statusStr = "【启用】"; |
| | | } |
| | | mytek.confirm("是否需要" + statusStr + "该信息?", "确认更新信息状态,请谨慎操作!", function (b) { |
| | | if (b) { |
| | | $.post("gwProduct.ashx", { "action": "updateStatus", id: id, isEnable: isEnable }, function (r) { |
| | | mytek.alert(r.Message, r.OK, function () { |
| | | loadPageList(); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | |
| | | "json"); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //上传图标文件 |
| | | $(document).on("click", ".action-upLoad", function () { |
| | | //var id = $(this).data("id"); |
| | | var name = "上传图标文件" ; |
| | | //$("#ablackpool").val(id); |
| | | $("#upLoad_form .modal-title").text(name); |
| | | $("#stopwatchTime").text(''); |
| | | $("#upLoad").modal("show"); |
| | | }); |
| | | |
| | | $("#upLoad_form").ajaxForm({ |
| | | beforeSend: function () { |
| | | $('#upLoad_form .action-save').attr('disabled', "true"); |
| | | $('#upLoad_form .action-save').text('正在上传...'); |
| | | }, |
| | | success: function (result) { |
| | | if (result.OK) { |
| | | mytek.alert(result.Message.Message); |
| | | $("#stopwatchTime").text(result.Message.Msg); |
| | | $('#upLoad_form .action-save').removeAttr("disabled"); |
| | | $("#certPath").val(''); |
| | | $('#upLoad_form .action-save').text('上传'); |
| | | } else { |
| | | mytek.alert(result.Message, result.False); |
| | | $('#upLoad_form .action-save').removeAttr("disabled"); |
| | | $('#upLoad_form .action-save').text('上传'); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | $(document).on("click", ".action-btn-GwProductQuery", function() { |
| | |
| | | }); |
| | | </script> |
| | | </asp:Content> |
| | | <asp:Content runat="server" ID="Content2" ContentPlaceHolderID="title">产品或产品分类管理</asp:Content> |
| | | <asp:Content runat="server" ID="Content2" ContentPlaceHolderID="title">产品管理</asp:Content> |
| | | <asp:Content ID="Content3" ContentPlaceHolderID="content" runat="Server"> |
| | | |
| | | <form name="queryForm" method="get" action="GwProduct.aspx" id="queryForm" class="form-inline" |
| | |
| | | <input type="text" name="Name" id="Name" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | <!-- |
| | | <div class="form-group"> |
| | | <div class="input-group"> |
| | | <select name="Classes" id="Classes" class="form-control"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="form-group"> |
| | | <div class="input-group"> |
| | | <input type="button" value="查询" class="btn btn-primary action-btn-GwProductQuery" /> |
| | |
| | | <tr class="header"> |
| | | <th>图标 |
| | | </th> |
| | | <th>名称 |
| | | <th>所属产品类别 |
| | | </th> |
| | | <th>使用说明 |
| | | <th>产品名称 |
| | | </th> |
| | | <!-- |
| | | <th>类别 |
| | | </th> |
| | | <th>通道 |
| | | </th> |
| | | <th>父级产品分类ID |
| | | --> |
| | | <th>通道或通道组 |
| | | </th> |
| | | <th>是否默认 |
| | | </th> |
| | | <th>是否启用 |
| | | </th> |
| | | <!-- |
| | | <th>排序 |
| | | </th> |
| | | --> |
| | | <th>赠送条数 |
| | | </th> |
| | | <th>参考单价 |
| | | <th>参考单价(元/条) |
| | | </th> |
| | | <th>创建时间 |
| | | </th> |
| | | <th class="text-right">操作 |
| | | <th>使用说明 |
| | | </th> |
| | | <th class="text-center">操作 |
| | | </th> |
| | | </tr> |
| | | </thead> |
| | |
| | | <h4 class="modal-title">编辑产品资料</h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="form-group"> |
| | | <div class="form-group" style="display: none"> |
| | | <label class="col-sm-2 control-label"> |
| | | 类别</label> |
| | | <div class="col-sm-4 "> |
| | |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label"> |
| | | 父级分类ID</label> |
| | | 所属产品类别 <span style="color:red">*</span></label> |
| | | <div class="col-sm-4 "> |
| | | <select name="parentId" id="parentId"> |
| | | <select name="parentId" id="parentId" class="form-control"> |
| | | <%=GetProductClassOptions("0")%> |
| | | </select> |
| | | </div> |
| | |
| | | <label class="col-sm-2 control-label"> |
| | | 图标</label> |
| | | <div class="col-sm-4 "> |
| | | <a class="action-upLoad btn btn-info btn-xs " href="javascript:; ">选择上传文件</a> |
| | | <!-- |
| | | <input type="file" id="certPath" name="certPath" /> |
| | | <span id="stopwatchTime" style="- word-wrap: break-word; word-break: break-all;"></span> |
| | | |
| | | <input type="text" class="form-control" name="icon" id="icon" value="" /> |
| | | --> |
| | | <div><img id="showImg" name="showImg" src=""></div> |
| | | <select id="icon" name="icon" class="form-control" > |
| | | <option value="">--请选择图标--</option> |
| | | <option value="marketingSMS-32.png" >marketingSMS-32.png</option> |
| | | <option value="noticeSMS-32.png" >noticeSMS-32.png</option> |
| | | <option value="VerificationCodeSMS-32.png" >VerificationCodeSMS-32.png</option> |
| | | </select> |
| | | </div> |
| | | <span class="help-block m-b-none">类别为产品时,产品的图标标识;上传文件格式为BMP(位图)、JPG、JPEG、PNG、GIF文件(文件大小不能超过5M)。 |
| | | </span> |
| | | <span class="help-block m-b-none">类别为产品时,产品的图标标识。 |
| | | </span> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label"> |
| | | 名称</label> |
| | | 名称 <span style="color:red">*</span> |
| | | </label> |
| | | <div class="col-sm-4 "> |
| | | <input type="text" class="form-control" name="name" id="name" value="" /> |
| | | </div> |
| | |
| | | </div> |
| | | <span class="help-block m-b-none">个性化客户是指特殊推送给客户;系统默认是指系统默认可推送所有客户。</span> |
| | | </div> |
| | | <%--<input type="hidden" class="form-control" name="isDefault" id="isDefault" value="1" />--%> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label"> |
| | | 是否启用</label> |
| | |
| | | <label class="col-sm-2 control-label"> |
| | | 排序</label> |
| | | <div class="col-sm-4"> |
| | | <div class="input-group"> |
| | | <input type="text" class="form-control" name="sort" id="sort" value="" |
| | | maxlength="5" onkeyup="value=value.replace(/[^\d]/g,'')" onpaste="value=value.replace(/[^\d]/g,'')" |
| | | oncontextmenu="return false" /> |
| | | </div> |
| | | <input type="text" class="form-control" name="sort" id="sort" value="" |
| | | maxlength="5" onkeyup="value=value.replace(/[^\d]/g,'')" onpaste="value=value.replace(/[^\d]/g,'')" |
| | | oncontextmenu="return false" /> |
| | | </div> |
| | | </div> |
| | | <div class="form-group classes-span classes-span-1"> |
| | | <label class="col-sm-2 control-label"> |
| | | 通道路由</label> |
| | | <div class="col-sm-10"> |
| | | <select name="RouterType" id="RouterType"> |
| | | <div class="col-sm-4"> |
| | | <select name="routerType" id="routerType" class="form-control"> |
| | | <option value="1" >指定通道路由</option> |
| | | <option value="3" >通道组路由模式</option> |
| | | </select> |
| | |
| | | |
| | | <div class="router-type-span router-type-span-1"> |
| | | <div style="padding: 5px"> |
| | | 移动:<select name="cmOpId" id="cmOpId"> |
| | | 移动:<select name="cmOpId" id="cmOpId" > |
| | | <%=GetOpOptions(0)%> |
| | | </select> 扩展参数:<input type="text" name="cmExtParams" id="cmExtParams" maxlength="600" |
| | | </select> |
| | | <!-- |
| | | 扩展参数:<input type="text" name="cmExtParams" id="cmExtParams" maxlength="600" |
| | | value="" style="width: 50%;" placeholder="移动扩展参数" /> |
| | | --> |
| | | </div> |
| | | <div style="padding: 5px"> |
| | | 联通:<select name="cuOpId" id="cuOpId"> |
| | | 联通:<select name="cuOpId" id="cuOpId" > |
| | | <%=GetOpOptions(0)%> |
| | | </select> 扩展参数:<input type="text" name="cuExtParams" id="cuExtParams" maxlength="600" |
| | | </select> |
| | | <!-- |
| | | 扩展参数:<input type="text" name="cuExtParams" id="cuExtParams" maxlength="600" |
| | | value="" style="width: 50%;" placeholder="联通扩展参数" /> |
| | | --> |
| | | </div> |
| | | <div style="padding: 5px"> |
| | | 电信:<select name="ctOpId" id="ctOpId"> |
| | | 电信:<select name="ctOpId" id="ctOpId" > |
| | | <%=GetOpOptions(0)%> |
| | | </select> 扩展参数:<input type="text" name="ctExtParams" id="ctExtParams" maxlength="600" |
| | | </select> |
| | | <!-- |
| | | 扩展参数:<input type="text" name="ctExtParams" id="ctExtParams" maxlength="600" |
| | | value="" style="width: 50%;" placeholder="电信扩展参数" /> |
| | | --> |
| | | </div> |
| | | <!-- |
| | | <span class="help-block m-b-none">CMPP2.0,CMPP3.0协议支持扩展参数有:SERVICEID(服务代码/业务代码(最长10位)),FEECODE(费用代码(最长6位)),FEETYPE(费用类型),FEEUSERTYPE,FEETERMINALID(计费号码) |
| | | SGIP支持扩展参数有:SERVICETYPE(业务代码(最长10位)),CHARGENUMBER(计费号码(最长21位)),FEEVALUE(收费值(最长6位)),GIVENVALUE,NODEID(节点(最长6位)),CONNTIMEOUT(连接超时) |
| | | SMGP支持扩展参数有:SERVICEID(服务代码/业务代码(最长10位)),FIXEDFEE(包月费/封顶费(最长6位)),FEECODE(费用代码/资费代码(最大6位));</span> |
| | | --> |
| | | </div> |
| | | <div class="router-type-span router-type-span-3"> |
| | | <div style="padding: 5px"> |
| | |
| | | 参考单价</label> |
| | | <div class="col-sm-4"> |
| | | <div class="input-group"> |
| | | <input type="text" class="form-control" name="price" id="price" value="" maxlength="5" |
| | | <input type="text" class="form-control" name="price" id="price" value="" maxlength="10" |
| | | onkeyup="value=value.replace(/[^\d\.]/g,'')" onpaste="value=value.replace(/[^\d\.]/g,'')" |
| | | oncontextmenu="return false" /><span class="input-group-addon">元/条 </span> |
| | | </div> |
| | |
| | | 默认赠送条数</label> |
| | | <div class="col-sm-4"> |
| | | <div class="input-group"> |
| | | <input type="text" class="form-control" name="givingNum" id="givingNum" value="" maxlength="5" |
| | | <input type="text" class="form-control" name="givingNum" id="givingNum" value="" maxlength="10" |
| | | onkeyup="value=value.replace(/[^\d\.]/g,'')" onpaste="value=value.replace(/[^\d\.]/g,'')" |
| | | oncontextmenu="return false" /><span class="input-group-addon">条 </span> |
| | | </div> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label"> |
| | | 备注</label> |
| | | <div class="col-sm-10 input-group m-b"> |
| | | <input type="text" class="form-control" name="remark" id="remark" value="" /> |
| | | <div class="col-sm-4"> |
| | | <textarea class="form-control" name="remark" id="remark" rows="4" ></textarea> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </form> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="modal inmodal fade" id="upLoad" tabindex="-1" role="dialog" |
| | | aria-hidden="true"> |
| | | <form name="upLoad_form" method="post" action="GwProduct.ashx?action=upLoad" |
| | | id="upLoad_form" class="form-horizontal"> |
| | | <div class="modal-dialog form-horizontal"> |
| | | <div class="modal-content "> |
| | | <input type="hidden" id="ablackpool" value="" name="ablackpool" /> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal"> |
| | | <span aria-hidden="true">×</span><span class="sr-only">Close</span></button> |
| | | <h4 class="modal-title"> |
| | | 上传文件 |
| | | </h4> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class="form-group"> |
| | | <label class="control-label col-sm-3"> |
| | | 请选择要上传的图标文件</label> |
| | | <input type="file" id="certPath" name="certPath" /> |
| | | |
| | | <span id="stopwatchTime" style="word-wrap: break-word; word-break: break-all;"></span> |
| | | </div> |
| | | <div> |
| | | <h3> |
| | | 说明</h3> |
| | | <ul> |
| | | <li class="text-info">上传文件格式为BMP(位图)、JPG、JPEG、PNG、GIF文件(文件大小不能超过5M);</li> |
| | | |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button class="btn btn-default " data-dismiss="modal" aria-hidden="true"> |
| | | 取消</button> |
| | | <button class="btn btn-primary action-save"> |
| | | 上传</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <!-- footBar --> |
| | | <div id="mask" class="mask"> |
| | | <span></span> |