|
|
|
@ -134,13 +134,19 @@ class StatementWarningController extends AdminController
|
|
|
|
|
}
|
|
|
|
|
unset($data[$type]['list'][$name]);
|
|
|
|
|
if(isset($this->statementWarningKey[$name])){
|
|
|
|
|
if( in_array($name,['margin_ratio','profit_ratio']) ){
|
|
|
|
|
$data[$type]['list'][$name]['is_edit'] = 0;
|
|
|
|
|
}else{
|
|
|
|
|
$data[$type]['list'][$name]['is_edit'] = 1;
|
|
|
|
|
}
|
|
|
|
|
$data[$type]['list'][$name]['name'] = $this->statementWarningKey[$name];
|
|
|
|
|
$data[$type]['list'][$name]['list'] = $value;
|
|
|
|
|
$data[$type]['list'][$name]['is_edit'] = 0;
|
|
|
|
|
$data[$type]['list'][$name]['is_del'] = 0;
|
|
|
|
|
}else{
|
|
|
|
|
$data[$type]['list'][$name]['name'] = $name;
|
|
|
|
|
$data[$type]['list'][$name]['list'] = $value;
|
|
|
|
|
$data[$type]['list'][$name]['is_edit'] = 1;
|
|
|
|
|
$data[$type]['list'][$name]['is_del'] = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -168,6 +174,7 @@ class StatementWarningController extends AdminController
|
|
|
|
|
if($act == 'add'){
|
|
|
|
|
$isEdit = 0;
|
|
|
|
|
$this->assign('is_edit', 0);
|
|
|
|
|
$this->assign('chenge_name', 1);
|
|
|
|
|
}else{
|
|
|
|
|
$this->assign('is_edit', 1);
|
|
|
|
|
}
|
|
|
|
@ -222,22 +229,32 @@ class StatementWarningController extends AdminController
|
|
|
|
|
}
|
|
|
|
|
private function resetWarningData()
|
|
|
|
|
{
|
|
|
|
|
//获取真实名称
|
|
|
|
|
$name = $_REQUEST['name'];
|
|
|
|
|
$sendData = [
|
|
|
|
|
'value'=>[0,0,0,0,0,0,0,0,0,0,0,0],
|
|
|
|
|
'ids'=>[0,0,0,0,0,0,0,0,0,0,0,0],
|
|
|
|
|
'chenge_name'=>1,
|
|
|
|
|
'count_year'=>$_REQUEST['count_year']
|
|
|
|
|
];
|
|
|
|
|
$key = array_flip($this->statementWarningKey);
|
|
|
|
|
if(isset($key[$_REQUEST['name']])){
|
|
|
|
|
$sendData['chenge_name'] = 0;
|
|
|
|
|
$sendData['orgin_name'] = $key[$_REQUEST['name']];
|
|
|
|
|
$sendData['name'] = $name;
|
|
|
|
|
$name = $key[$_REQUEST['name']];
|
|
|
|
|
}else{
|
|
|
|
|
$sendData['orgin_name'] = $name;
|
|
|
|
|
$sendData['name'] = $name;
|
|
|
|
|
}
|
|
|
|
|
$where = [
|
|
|
|
|
'name'=>$_REQUEST['name'],
|
|
|
|
|
'name'=>$name,
|
|
|
|
|
'count_year'=>$_REQUEST['count_year']
|
|
|
|
|
];
|
|
|
|
|
$data = $this->statementWarningModel->where($where)->select();
|
|
|
|
|
|
|
|
|
|
$sendData = [
|
|
|
|
|
'count_year'=>$data[0]['count_year'],
|
|
|
|
|
'type'=>$data[0]['type'],
|
|
|
|
|
'name'=>$data[0]['name'],
|
|
|
|
|
'value'=>[0,0,0,0,0,0,0,0,0,0,0,0],
|
|
|
|
|
'ids'=>[0,0,0,0,0,0,0,0,0,0,0,0]
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
$sendData['type'] = $data[0]['type'];
|
|
|
|
|
foreach ($data as $key => $value) {
|
|
|
|
|
$sendData['value'][$value['count_month']-1] = $value['money']/10000;
|
|
|
|
|
$sendData['value'][$value['count_month']-1] = round($value['money']/10000,2);
|
|
|
|
|
$sendData['ids'][$value['count_month']-1] = $value['id'];
|
|
|
|
|
}
|
|
|
|
|
$this->assign('data', $sendData);
|
|
|
|
|