您好,登錄后才能下訂單哦!
<!--添加廣告位信息開始--> <div class="all" > <div class="widget-header"> <h5>廣告位明細(最多5條)</h5><div ><h5 id="newyz1">+增加</h5></div> </div> <div class="one1"> <div class="contract-contracttype"> <div class="form-group field-contract-contracttype required has-success"> <label class="col-sm-1 control-label no-padding-right" for="receivableamount[contractId]">廣告位</label> <div class="col-lg-2"> <input type="hidden" class="advertId" name="advertId[]" id="advertId" value=""> <input type="hidden" class="advertname1" name="advertname1[]" id="advertname1" value=""> <select id="port" class="form-control port" name="port[]" onchange="checkadvertname(this);"> <?php foreach($port as $key=>$value):?> <option value="<?=$value['key']?>"><?=$value['value']?></option> <?php endforeach;?> </select> </div> <div class="col-lg-2"> <select id="page" class="form-control page" name="page[]" onchange="checkadvertname(this);"> <?php foreach($page as $key=>$value):?> <option value="<?=$value['key']?>"><?=$value['value']?></option> <?php endforeach;?> </select> </div> <div class="col-lg-2"> <select id="advertname" class="form-control advertname" name="advertname[]" onchange="getadvert(this)"> <option value="0">請選擇廣告位</option> </select> </div> </div> </div> <div class="form-group field-applypay-paymenttime"> <label class="col-sm-1 control-label no-padding-right" for="applypay-paymenttime">發布時間</label> <div class="col-sm-3 col-lg-2"> <div class="input-group"> <span class="input-group-addon"><i class="icon-calendar bigger-110"></i></span> <input class="form-control date-picker datetime-picker3" id="projectStime" name="projectStime[]" data-date-format="dd-mm-yyyy" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" type="text"> <em >-</em> </div> </div> <div class="col-sm-3 col-lg-2"> <div class="input-group"> <span class="input-group-addon"><i class="icon-calendar bigger-110"></i></span> <input class="form-control date-picker datetime-picker3" id="projectEtime" name="projectEtime[]" data-date-format="dd-mm-yyyy" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" type="text"> </div> </div> </div> <div class="form-group field-receivableamout-reason required"> <label class="col-sm-1 control-label no-padding-right" for="receivableamout-reason">備注說明</label> <div class="col-lg-5"><input type="text" id="receivableamout-reason" class="form-control" name="reason[]" maxlength="100"></div> <div class="col-lg-3"> <div class="help-block"></div></div> </div> </div> <span class="form-group" id="xx"> </span> <div class="form-group field-receivableamout-reason required"> <label class="col-lg-1 control-label no-padding-right" for="receivableamout-reason">上傳附件</label> <div class="col-lg-11 wdata1"> <div class="col-lg-3 btnimg"> <label for="uploadImg" class="btn btn-primary fileimg"><i class="fa-plus-sign"></i> <span>上傳</span> <input class="UploadImg" data="1" type="file" name="files[]" multiple></label> </label> </div> </div> </div> </div> <!--添加廣告位信息結束-->
$("#newyz1").bind('click',function() { _addnum++; var num=_addnum; console.log(num); if($(".one1").length>4){ layer.msg("最多5條數據"); return false; } var html='<div class="one1">\n' + ' <div class="contract-contracttype">\n' + ' <div class="form-group field-contract-contracttype required has-success">\n' + '<input type="hidden" class="advertId" name="advertId[]" id="advertId" value="">\n'+ ' <input type="hidden" class="advertname1" name="advertname1[]" id="advertname1" value="">\n'+ ' <label class="col-sm-1 control-label no-padding-right" for="receivableamount[contractId]">廣告位</label>\n' + ' <a href="javascript:void(0)" class="khnimus1" title="" id="newyz1" data-original-title=""><i class="icon-trash bigger-130"></i></a>\n'+ ' <div class="col-lg-2">\n' + ' <select id="port" class="form-control port" name="port[]" onchange="checkadvertname(this);">\n'; for (var i=0;i<ports.length;i++){ html+='<option value='+ports[i]['key']+'>'+ports[i]['value']+'</option>'; } html+='</select>\n' + ' </div>\n' + ' <div class="col-lg-2">\n' + ' <select id="page" class="form-control page" name="page[]" onchange="checkadvertname(this);" >\n'; for (var i=0;i<pages.length;i++){ html+='<option value='+pages[i]['key']+'>'+pages[i]['value']+'</option>'; } html+='</select>\n' + ' </select>\n' + ' </div>\n' + ' <div class="col-lg-2">\n' + ' <select id="advertname" class="form-control advertname" name="advertname[]" onchange="getadvert(this)" >\n' + ' <option value="0">請選擇廣告位</option>\n' + ' </select>\n' + ' </div>\n' + '\n' + ' </div>\n' + ' </div>\n' + ' <div class="form-group field-applypay-paymenttime">\n' + ' <label class="col-sm-1 control-label no-padding-right" for="applypay-paymenttime">發布時間</label>\n' + ' <div class="col-sm-3 col-lg-2">\n' + ' <div class="input-group">\n' + ' <span class="input-group-addon"><i class="icon-calendar bigger-110"></i></span>\n' + ' <input class="form-control date-picker datetime-picker3" id="projectStime" name="projectStime[]" data-date-format="dd-mm-yyyy" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" type="text">\n' + ' <em >-</em>\n' + ' </div>\n' + ' </div>\n' + ' <div class="col-sm-3 col-lg-2">\n' + ' <div class="input-group">\n' + ' <span class="input-group-addon"><i class="icon-calendar bigger-110"></i></span>\n' + ' <input class="form-control date-picker datetime-picker3" id="projectEtime" name="projectEtime[]" data-date-format="dd-mm-yyyy" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" type="text">\n' + ' </div>\n' + ' </div>\n' + ' </div>\n' + ' <div class="form-group field-receivableamout-reason required">\n' + ' <label class="col-sm-1 control-label no-padding-right" for="receivableamout-reason">備注說明</label>\n' + ' <div class="col-lg-5"><input type="text" id="receivableamout-reason" class="form-control" name="reason[]" maxlength="100"></div>\n' + ' <div class="col-lg-3">\n' + ' <div class="help-block"></div></div>\n' + ' </div>\n' + // ' <div class="form-group field-receivableamout-reason required">\n' + // ' <label class="col-lg-1 control-label no-padding-right" for="receivableamout-reason">上傳附件</label>\n' + // ' <div class="col-lg-11 wdata'+num+'">\n' + // ' <div class="col-lg-3 btnimg">\n' + // ' <label for="uploadImg" class="btn btn-primary fileimg"><i class="fa-plus-sign"></i>\n' + // ' <span>上傳</span>\n' + // ' <input class="UploadImg" data="'+num+'" type="file" name="files[]" multiple></label>\n' + // ' </label>\n' + // ' </div>\n' + // ' </div>\n' + // ' </div>\n'+ '</div>'; $('#xx').append(html); //jq上傳插件開始 $(".UploadImg").fileupload({ url: 'http://imgapi.qq.com/upload/php/upload.php', sequentialUploads: true, formData: {"app": 'brzy'}, returnType: "json", acceptFiles: "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/*,p_w_picpath/*,.pdf,.zip,.rar,.doc,.docx", dataType: 'json', // 上傳完成后的執行邏輯 done: function (e, data) { var n = data.jqXHR.responseText; var an = JSON.parse(n); // console.log(an); layer.closeAll(); // if(typeof(_clickBut)=='undefined'){ // var _clickBut=''; // } _clickBut = $(this).attr('data');//哪個按鈕被點擊了 console.log($(this)); callback(an.url); }, // 上傳過程中的回調函數 progressall: function (e, data) { layer.load(0, {shade: false}); } }); //jq插件結束 $(".khnimus1").live('click',function(){ $(this).parents(".one1").remove(); }); });
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。