Commit fd7d157d authored by duxinyuan's avatar duxinyuan

提交,是否参与活动

parent 56d5606d
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<span class="btn btn-info btn3 ld-Marheight checked" data-index="1" style="float: left;">考勤 核对无误</span> <span class="btn btn-info btn3 ld-Marheight checked" data-index="1" style="float: left;">考勤 核对无误</span>
<span class="btn btn-info btn3 ld-Marheight checked" data-index="2" style="float: left;">社保 核对无误</span> <span class="btn btn-info btn3 ld-Marheight checked" data-index="2" style="float: left;">社保 核对无误</span>
<span class="btn btn-info btn3 ld-Marheight checked" data-index="3" style="float: left;">手续费 核对无误</span> <span class="btn btn-info btn3 ld-Marheight checked" data-index="3" style="float: left;">手续费 核对无误</span>
<span class="btn btn-info btn3 ld-Marheight " id="joinactive" style="float: right;">修改是否参与活动</span> <span class="btn btn-info btn3 ld-Marheight " style="float: right;" href="#modal-yn" data-toggle="modal" >修改是否参与活动</span>
</form> </form>
</td> </td>
...@@ -147,3 +147,38 @@ ...@@ -147,3 +147,38 @@
<div id="img_mask_area" title="点击任意位置可关闭"> <div id="img_mask_area" title="点击任意位置可关闭">
<img /> <img />
</div> </div>
<!-- 编辑门店 -->
<div class="modal fade" id="modal-yn" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title"> 是否参与活动 </h4>
</div>
<div class="modal-body">
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
<span class="col-xs-4 ld-Marheight " style="margin-top:10px;">是否参与活动</span>
<select class="btn2 ld-Marheight form-control col-xs-5" style="width:30%!important" id="modal-select">
<option value="0"></option>
<option value="1"></option>
</select>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消
</button>
<button type="button" class="btn btn-info newStore" id="joinactive">确定</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
...@@ -24,7 +24,6 @@ define(['doT', 'text!temp/attendance_template_tpl.html', 'css!style/home.css', ' ...@@ -24,7 +24,6 @@ define(['doT', 'text!temp/attendance_template_tpl.html', 'css!style/home.css', '
var that = cost; var that = cost;
that.initCity(); that.initCity();
var _doc = $(document); var _doc = $(document);
console.log(window.location)
//初始化 //初始化
$('.pic-con2').show(); $('.pic-con2').show();
$('.pic-con1').hide(); $('.pic-con1').hide();
...@@ -58,19 +57,29 @@ define(['doT', 'text!temp/attendance_template_tpl.html', 'css!style/home.css', ' ...@@ -58,19 +57,29 @@ define(['doT', 'text!temp/attendance_template_tpl.html', 'css!style/home.css', '
}); });
}) })
$('#modal-yn').on('show.bs.modal', function () {
console.log('show')
$(document).on('click','#joinactive',function(e){ // $('#joinactive').unbind('click').bind('click',function(){
let vaules = [] ; $('#joinactive').unbind('click').bind('click',function(e){
$('[name=tableCheck]:checked').each(function(i,e){ // $(document).on('click','#joinactive',function(e){
let obj = {} let changed = $('#modal-select').val();
obj.discounts = $(this).attr("data-dazhe") == 1 ? 0 : 1 , console.log(changed)
obj.id = this.value, let vaules = [] ;
vaules.push(obj); $('[name=tableCheck]:checked').each(function(i,e){
}); let obj = {}
that.updateIsJoinActive(vaules); //obj.discounts = $(this).attr("data-dazhe") == 1 ? 0 : 1 ,
obj.discounts = changed,
obj.id = this.value,
vaules.push(obj);
});
if ( vaules.length == 0 ){
alert("请选择门店");
return false ;
}
that.updateIsJoinActive(vaules);
}) })
});
$(document).on('click','.tableValSave',function(e){ $(document).on('click','.tableValSave',function(e){
let value = $(this).prev().val() ; let value = $(this).prev().val() ;
...@@ -131,13 +140,12 @@ define(['doT', 'text!temp/attendance_template_tpl.html', 'css!style/home.css', ' ...@@ -131,13 +140,12 @@ define(['doT', 'text!temp/attendance_template_tpl.html', 'css!style/home.css', '
updateIsJoinActive : function( params ){ updateIsJoinActive : function( params ){
let that = this ; let that = this ;
that.pageNo = 1 ; that.pageNo = 1 ;
that.getList(1); that.getList(1);
$.post('/index/editDiscounts',{'id_discounts_json' : JSON.stringify(params),setting_date : that.getDate()},function(data){ $.post('/index/editDiscounts',{'id_discounts_json' : JSON.stringify(params),setting_date : that.getDate()},function(data){
if (data.code == 200 && data.data != null) { if (data.code == 200 && data.data != null) {
cost.pageNo = 1 ; cost.pageNo = 1 ;
$("#modal-yn").modal('hide');
cost.getList(1); cost.getList(1);
} else { } else {
alert(res.msg) alert(res.msg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment