奖罚记录管理优化

master
liuweiwen 5 years ago
parent 0aad9c4735
commit 2bffe498bf

@ -325,6 +325,9 @@ class StatementMangementController extends ThinkController
$data['accounts'] = json_decode($data['accounts'], true) ?: []; $data['accounts'] = json_decode($data['accounts'], true) ?: [];
$this->assign('data', $data); $this->assign('data', $data);
} }
} else {
$data['reward_time'] = strtotime(date('Y-m-01'));
$this->assign('data', $data);
} }
$this->display(); $this->display();
} }

@ -62,7 +62,7 @@
charset="UTF-8"></script> charset="UTF-8"></script>
<form action="{:U('StatementMangement/rewardManageSave')}" enctype="application/x-www-form-urlencoded" method="POST" <form action="{:U('StatementMangement/rewardManageSave')}" enctype="application/x-www-form-urlencoded" method="POST"
class="form-horizontal form_info_ml"> class="form-horizontal form_info_ml" id="form">
<div class="formtitle"><span>奖惩编辑</span></div> <div class="formtitle"><span>奖惩编辑</span></div>
<ul class="form_info "> <ul class="form_info ">
<input type="hidden" name="id" value="{$data.id}" /> <input type="hidden" name="id" value="{$data.id}" />
@ -145,7 +145,10 @@
<textarea name="remark" class="" placeholder="备注" >{$data.remark}</textarea> <textarea name="remark" class="" placeholder="备注" >{$data.remark}</textarea>
</li> </li>
<li> <li>
<label>&nbsp;</label><input type="submit" id="submit" value="确认保存" target-form="form-horizontal" class="form_btn"> <label>&nbsp;</label>
<button class="submit_btn ajax-post" id="submit" type="submit" target-form="form-horizontal">
确认保存
</button>
<input type="button" value="返 回" target-form="form-horizontal" class="form_btn ajax-post" onclick="javascript:void(window.history.go(-1))"> <input type="button" value="返 回" target-form="form-horizontal" class="form_btn ajax-post" onclick="javascript:void(window.history.go(-1))">
</li> </li>
</ul> </ul>
@ -171,18 +174,29 @@
$(document).on('click', '.bnt_remove', function(){ $(document).on('click', '.bnt_remove', function(){
$(this).parents('li').remove(); $(this).parents('li').remove();
}); });
var date = new Date();
// $('#reward_time').datetimepicker({ var monthStart = date.getFullYear()+'-0'+(date.getMonth()+1)+'-01';
// format: 'yyyy-mm-dd', $("#reward_time").datetimepicker({
// language: "zh-CN", format : "yyyy-mm-dd hh:ii",
// minView: 2, autoclose : true,
// autoclose: true todayBtn : true,
// }); todayHighlight : true,
$('#reward_time').datetimepicker({ startDate : monthStart,
language:"zh-CN", language : 'zh-CN',
hour: 13, startView : 2,//月视图
minute: 15 showMeridian : true,
pickerPosition : "bottom-left",
minuteStep : 5
}); });
/* $('#reward_time').datetimepicker({
language:"zh-CN",
hour: 13,
minute: 15,
setStartDate:'2020-02-01',
todayHighlight : true,
todayBtn:true
});*/
var company_id = '{$data["company_id"]}'; var company_id = '{$data["company_id"]}';
function companyTypeChange() function companyTypeChange()
{ {

Loading…
Cancel
Save