master
yulingwei 4 years ago
parent 066610f236
commit e0d74cbffd

@ -346,7 +346,6 @@ class StatementMangementController extends ThinkController
') ')
->where($map) ->where($map)
->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT')->select(); ->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT')->select();
if ($list) { if ($list) {
$record = []; $record = [];
foreach ($list as $item) { foreach ($list as $item) {
@ -529,12 +528,14 @@ class StatementMangementController extends ThinkController
$this->success('保存成功', U('StatementMangement/rewardManageList')); $this->success('保存成功', U('StatementMangement/rewardManageList'));
} }
} else { } else {
$data['create_time'] = time(); $data['create_time'] = time();
$data['creater_id'] = is_login(); $data['creater_id'] = is_login();
$ins = M('reward_record', 'tab_')->add($data); $ins = M('reward_record', 'tab_')->add($data);
$record_id = M('reward_record', 'tab_')->getLastInsID();
foreach ($settlmentSet as $item) { foreach ($settlmentSet as $item) {
$item['record_id'] = M('reward_record', 'tab_')->getLastInsID(); $item['record_id'] = $record_id;
M('reward_detail', 'tab_')->add($item); M('reward_detail', 'tab_')->add($item);
} }

@ -125,7 +125,7 @@
</div> </div>
<div class="input-list search_label_rehab"> <div class="input-list search_label_rehab">
<input type="text" id='detail_company_name' name="detail_company_name" value="{:I('detail_company_name')}" placeholder="请输入公司/部门"> <input type="text" id='detail_company_name' hidden disabled name="detail_company_name" value="{:I('detail_company_name')}" placeholder="请输入内部部门">
</div> </div>
<div class="input-list search_label_rehab"> <div class="input-list search_label_rehab">
@ -410,11 +410,13 @@
{ {
var companyId = $('#detail_company_id').val(); var companyId = $('#detail_company_id').val();
var companyType = $('#detail_company_type').val(); var companyType = $('#detail_company_type').val();
$('#detail_company_name').attr('disabled', true).hide();
//var companyType = $('#form-company-type').val(); //var companyType = $('#form-company-type').val();
// 如果公司类型为内部的时候,公司部门仅其他 // 如果公司类型为内部的时候,公司部门仅其他
if (companyType == 3) { if (companyType == 3) {
var companyData = "<option value='-1'>请选择公司/部门</option>"; var companyData = "<option value='-1'>请选择公司/部门</option>";
$('#detail_company_id').html(companyData); $('#detail_company_id').html(companyData);
$('#detail_company_name').attr('disabled', false).show();
//$("#detail_company_name").attr("readonly",false) //$("#detail_company_name").attr("readonly",false)
$('#detail_company_id').change(); $('#detail_company_id').change();
} else { } else {

@ -541,7 +541,7 @@
promoteData += "<option value='"+item.account+"' >"+item.account+"</option>"; promoteData += "<option value='"+item.account+"' >"+item.account+"</option>";
}); });
$('#form-promote-account').html(promoteData); $('#form-promote-account').html(promoteData);
$("#form-promote-account-input").attr("readonly",true) $("#form-promote-account-input").attr("readonly",false)
$("#form-company-name").attr("readonly",true) $("#form-company-name").attr("readonly",true)
$("#form-company-name").val($('#form-company-id option:selected').text()); $("#form-company-name").val($('#form-company-id option:selected').text());
} }

Loading…
Cancel
Save