promotionRule.html 4.4 KB
<script type="text/javascript" src='js/plugins/jquery.dataTables.min.js'></script>
<script>
    $(function (){
        $(".hasDatepicker1,.hasDatepicker2").jcDate({
            IcoClass : "jcDateIco",
            Event : "click",
            Speed : 100,
            Left : 0,
            Top : 28,
            format : "-",
            Timeout : 100
        });
    });
</script>
<div class="pageheader notab">
    <h1 class="pagetitle">促销规则模块</h1>
    <span class="pagedesc">管理V商城促销</span>
</div><!--pageheader-->
<div id="contentwrapper" class="contentwrapper">
	<div class="thumb"  ng-if="suppliersFlag == 1">
		<a class="btn btn2 btn_link" href="javaScript:void(0)" ng-click="addPromotion()">
			<span>添加促销</span>
		</a>
	</div>
	<div class="contenttitle2">
		<h3>促销规则</h3>
	</div>
	<div class="overviewhead">
		<div class="line">
			<label for="status" class="label">是否激活: </label>
			<div class="input">
				<select type="text" ng-model="promotionQuery.status" style="padding: 8px 8px;">
					<option value=''>--请选择--</option>
					<option value='0'>未生效</option>
					<option value='1'>激活</option>
					<option value='2'>已结束</option>
				</select>
			</div>
			<div  ng-if="suppliersFlag == 0" style="display:inline-block">
				<label  class="label">商家名称:</label>
				<div class="input">
					<select type="text" ng-model="promotionQuery.supplierId"    >
						<option value=''>--请选择--</option>
						<option ng-repeat="x in suppliers " value="{{x.id}}">{{x.name}}</option>
					</select>
				</div>
			</div>

			<label for="startDt" class="label">开始日期: </label>
			<div class="input">
				<input type="text" id="startDt" date-format placeholder="开始日期" class="laydate-icon"  name="startDt"
					   onClick="laydate({istime: true, format: 'YYYY-MM-DD',type: 'date' })" style="width: 150px;" ng-model="promotionQuery.startDt" />
				<!--<input type="text" id="startDt" class="hasDatepicker1" ng-model="promotionQuery.startDt" name="startDt"/>-->
			</div>
			<label for="endDt" class="label">结束日期: </label>
			<div class="input">
				<input type="text" id="endDt" date-format placeholder="结束日期" class="laydate-icon"
					   onClick="laydate({istime: true, format: 'YYYY-MM-DD',type: 'date'})" style="width: 150px;" ng-model="promotionQuery.endDt" />
				<!--<input type="text" id="endDt" class="hasDatepicker2" ng-model="promotionQuery.endDt" name="endDt"/>-->
			</div>
			<a class="btn btn2 btn_blue btn_search radius50" href="javascript:void(0)" ng-click="searchOrder()"><span>搜索</span></a>
		</div>
		<div class="line">

		</div>

	</div>
	<!--contenttitle-->
	<table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="dyntable3">
		<thead>
			<tr align="center">
				<th class="head0">序号</th>
				<th class="head1">规则名称</th>
				<!--<th class="head0">优先级</th>-->
				<th class="head0">开始时间</th>
				<th class="head0">结束时间</th>
				<th class="head0">是否限制数量</th>
				<th class="head0">限制的数量</th>
				<th class="head0">状态</th>
				<th class="head0"  ng-show="suppliersFlag == 0">商家名称</th>
				<th class="head0">类型</th>
				<th class="head0">操作</th>
			</tr>
		</thead>
		<tbody >
			<tr class="gradeX" align="center" ng-repeat="promotion in promotionList.datas">
				<td>{{$index+1}}</td>
				<td>{{ promotion.name}}</td>
				<!--<td>{{ promotion.prority}}</td>-->
				<td>{{ promotion.startDate}}</td>
				<td>{{ promotion.endDate}}</td>
				<td ng-if="promotion.isLimit == 1"><span class="yeqian_stl"></span></td>
				<td ng-if="promotion.isLimit == 0"><span class="close_stl"></span></td>
				<td>{{ promotion.limitNum}}</td>
				<td ng-if="promotion.status == 0"><span class="open_stl">未生效</span></td>
				<td ng-if="promotion.status == 1"><span class="yeqian_stl">激活</span></td>
				<td ng-if="promotion.status ==2"><span class="close_stl">结束</span></td>
				<td ng-if="promotion.platformType ==0" ng-show="suppliersFlag == 0">平台神卷</span></td>
				<td ng-if="promotion.platformType ==1"ng-show="suppliersFlag == 0">{{promotion.supplierName}}</span></td>
				<td >{{promotionTypes[promotion.type]}}</td>
				<td>
					<a class="btn btn3 btn_book" href="#addPromotion/{{promotion.id}}/{{promotion.type}}"></a>&nbsp;&nbsp;&nbsp;&nbsp;
					<a class="btn btn3 btn_trash" href="javascript:void(0)" ng-click="deletePromotion(promotion.id)"></a>
				</td>
			</tr>
		</tbody>
	</table>
</div>