| | |
| | | |
| | | 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); |
| | |
| | | $("#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"); |
| | | |
| | |
| | | //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(); |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | |
| | | }); |
| | | </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> |
| | |
| | | </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> |