addAdvert.html 7.3 KB
<script type="text/javascript" src="./js/custom/jquery.form.js"></script>
<style type="text/css">
	.demo{width:620px; margin:30px auto}
	.demo p{line-height:32px}
	.btnfile{position: relative;overflow: hidden;margin-right: 4px;display:inline-block;*display:inline;padding:4px 10px 4px;font-size:14px;line-height:18px;*line-height:20px;color:#fff;text-align:center;vertical-align:middle;cursor:pointer;background-color:#5bb75b;border:1px solid #cccccc;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
	.btnfile input {position: absolute;top: 0; right: 0;margin: 0;border: solid transparent;opacity: 0;filter:alpha(opacity=0); cursor: pointer;}
	.progress { position:relative; margin:0; width:400px;padding: 1px; border-radius:3px; display:none; margin-left: 20px;}
	.progress:after,
	.progress:before{
		content:' ';
	}
	.bar {background-color: green!important; display:block; width:0%; height:20px; border-radius: 3px; }
	.percent { position:absolute; height:20px; display:inline-block; top:3px; left:2%; color:#fff }
	.files{height:22px; line-height:22px; margin:10px 0}
	.delimg{margin-left:20px; color:#090; cursor:pointer}
	.field:after {
		content: '';
		clear: both;
		display: table;
	}
	#productNames{width: 40%;height: auto;}
</style>
<div class="pageheader notab">
	<h1 class="pagetitle">添加广告位</h1>
	<span class="pagedesc">用于添加广告位,并设置时候显示在V商城首页</span>
</div>
<!--pageheader-->
<div id="contentwrapper" class="contentwrapper">
	<div id="basicform" class="subcontent" ng-keypress="myKeyup($event)">
		<div class="contenttitle2">
			<h3>广告位表单</h3>
		</div>
		<!--contenttitle-->
		<form class="stdform stdform2" method="post" action="javascript:void(0);" id="contents">
			<p>
				<label>广告位标题</label>
				<span class="field">
					<input type="text" id="firstname" class="longinput" name="name"
						   ng-model="editAdvertInfo.name" ng-value="{{editAdvertInfo.name}}"/>
					<span style="color:red;">*</span>
				</span>
			</p>
			<p>
				<label>是否显示</label> <span class="field">
				<input type="radio" name="radiofield" value="1" ng-model="editAdvertInfo.isShow" />显示 &nbsp; &nbsp;
				<input type="radio" name="radiofield" value="0"  ng-model="editAdvertInfo.isShow" />不显示&nbsp; &nbsp;
				</span>
			</p>
			<p>
				<label>广告位类型</label>
				<span class="field">
					<select name="typeId" id="selection2" ng-change="onChangeAdvertType(editAdvertInfo.typeId)" ng-model="editAdvertInfo.typeId">
						<option value='0' >--选择广告类型--</option>
						<option value='1' >商品广告位</option>
						<option value="2" >链接广告位</option>
						<option value="3" >专场广告位</option>
					</select>
					<span style="color:red;">*</span>
				</span>
			</p>
			<p ng-show="editAdvertInfo.typeId == 2">
				<label>广告位链接URL</label>
				<span class="field">
					<input type="text" id="linkUrl" class="longinput" name="linkUrl"
						   ng-model="editAdvertInfo.linkUrl" ng-value="{{editAdvertInfo.linkUrl}}"/>
					<span style="color:red;">*</span>
				</span>
			</p>
			<p ng-show="editAdvertInfo.typeId == 1">
				<label>关联的现金商品</label>
				<span class="field">
					<input type="text" id="firstname3" class="longinput" name="selectProductObj"
						   ng-model="selectProductObj" ng-value=""/>
					<span style="color:red;">*</span>
				</span>
			</p>
			<p ng-show="editAdvertInfo.typeId == 1">
				<label> </label>
				<span class="field">
					<input type="hidden" name="imProductId" ng-model="editAdvertInfo.imProductId" ng-value="" />
					<button   ng-click="showProduct()" >选择关联的现金商品</button>
				</span>
			</p>
			<p ng-show="editAdvertInfo.typeId == 3">
				<label>关联相关的专场</label>
				<span class="field">
					<select name="selection" id="selection3"
							ng-model="selectCampaginObj"
							ng-options="campagin.name for campagin in campagins">
						<option value="">--选择专场--</option>
					</select>
					<span style="color:red;">*</span>
				</span>
			</p>
			<p>
				<label>位置</label>
				<span class="field">
					<input type="text" id="firstname4" class="longinput" name="sortIndex"
						   ng-model="editAdvertInfo.sortIndex" ng-value="{{editAdvertInfo.sortIndex}}" style="width: 60px;"/>
					<span style="color:red;">*</span>
				</span>
			</p>
			<p>
				<label>广告缩略图</label>
				<span class="field">
                   	<input type="hidden" name="imageUrl" id="news_img_path" ng-model="editAdvertInfo.imageUrl" ng-value="{{editAdvertInfo.imageUrl}}"/>
                    <span class="btnfile" style="float:left">
	       				<span>上传缩略图</span>
	       				<input id="fileupload" type="file" name="attachs" upload-file />
			        </span>
			        <span class="progress">
			    		<span class="bar"></span>
			    		<span class="percent">0%</span>
					</span>

						<span style="display:block">
				        <span id="showimg">
				        	<span ng-if="editAdvertInfo.imageUrl !=''"><img ng-src='{{editAdvertInfo.imageUrl}}' style='width:100px; height:100px;'></span>
				        </span>
				        <span class="files"></span>
			        </span>
					<span style="color:red;">*</span>
				</span>
			</p>
			<p class="stdformbutton">
				<button class="submit radius2" ng-click="onSubmitAdvert()">提交</button>
				<input type="reset" class="reset radius2" value="重置" />
				<a href="javascript:void(0);" style="margin-left: 30px;" class="btn btn_red btn_trash" ng-click="deleteAdvert(editAdvertInfo.imAdvertId)"><span>删除广告位</span></a>
			</p>
		</form>

		<div>
			</br></br>
			<paging style="display: none; "   id="productNames" align="center">
				<div class="overviewhead"  >
					<div class="line">
						<label class="label" for="orderCode">商品关键字:</label>
						<div class="input">
							<input type="text" id="orderCode" ng-model="productQuery.keyword" name="keyword"/>
						</div>
						<button ng-click="searchProduct()" type="button" class="btnSelf btn btn-info">查询</button>
					</div>
				</div>
				<table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="dyntable3">
					<thead>
					<tr>
						<th align="center">商品名称</th>
					</tr>
					</thead>
					<tbody>
					<tr class="gradeX" ng-repeat="product in products" align="center">
						<td><a  href="javascript:void(0)" ng-click="ForProductObj(product)" >{{product.name}}</a></td>
					</tr>
					</tbody>
				</table>
				<div class="angular_pager" style="margin-left: 20px;">
					<ul class="pagination" num-pages="numPages" current-page="currentPage" on-select-page="selectPage(page)">
						<li ng-class="{disabled: noPrevious()}"> <a ng-click="selectPrevious()">&laquo;</a>
						</li>
						<li ng-repeat="page in pages" ng-class="{active: isActive(page)}"> <a ng-click="selectPage(page)">{{page}}</a>
						</li>
						<li ng-class="{disabled: noNext()}"> <a ng-click="selectNext()">&raquo;</a>
						</li>
						<li><span style="position: relative;top: 5px;margin-left: 10px;font-size: 14px;">共:<b style="color: red;">{{numPages}}</b>页,当前第<b style="color: red;">{{currentPage}}</b>页;总记录数:<b style="color: red;">{{totalRecord}}</b></span></li>
					</ul>
				</div>
			</paging>
		</div>
		<br />
	</div>
	<!--subcontent-->
</div>