| | |
| | | } |
| | | }); |
| | | |
| | | //选择图标下拉框 |
| | | $("#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"); |
| | | |
| | | //设置图标 |
| | | $("#icon").trigger("change"); |
| | | |
| | | $("#productDialog").modal("show"); |
| | | } |
| | |
| | | "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() { |
| | |
| | | <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"> |
| | |
| | | </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> |