public function view_addSampleCoefficient()
 {
     if (!isset($_SESSION['userId'])) {
         //检测用户是否登陆
         header('location:index.php?mod=login&act=index');
         exit;
     }
     $sampleCoefficientAct = new SampleCoefficientAct();
     $cName = isset($_POST['cName']) ? post_check(trim($_POST['cName'])) : '';
     $sampleTypeId = isset($_POST['sampleTypeId']) ? post_check($_POST['sampleTypeId']) : '';
     $sizeCodeId = isset($_POST['sizeCodeId']) ? post_check($_POST['sizeCodeId']) : '';
     $Ac = isset($_POST['Ac']) ? post_check($_POST['Ac']) : '';
     $Re = isset($_POST['Re']) ? post_check($_POST['Re']) : '';
     $Al = isset($_POST['Al']) ? post_check($_POST['Al']) : '';
     $Rt = isset($_POST['Rt']) ? post_check($_POST['Rt']) : '';
     if (empty($cName) || empty($sampleTypeId) || empty($sizeCodeId) || trim($Ac) == '' || trim(Re) == '' || trim($Al) == '' || trim(RT) == '') {
         //为空时,跳转到列表页面,输出错误信息
         $status = '添加失败,存在必填项为空的字段';
         header("location:index.php?mod=sampleCoefficient&act=getSampleCoefficientList&status={$status}");
         exit;
     }
     $where = "WHERE cName='{$cName}' AND sampleTypeId='{$sampleTypeId}' AND sizeCodeId='{$sizeCodeId}' ";
     $sampleCoefficientList = $sampleCoefficientAct->act_getSampleCoefficientList('id', $where);
     if (!empty($sampleCoefficientList)) {
         $status = '添加失败,已有相同的系数、样本类型、样本大小记录';
         header("location:index.php?mod=sampleCoefficient&act=getSampleCoefficientList&status={$status}");
         exit;
     }
     $set = "SET cName='{$cName}',sampleTypeId='{$sampleTypeId}',sizeCodeId='{$sizeCodeId}',Ac='{$Ac}',Re='{$Re}',Al='{$Al}',Rt='{$Rt}' ";
     $affectRow = $sampleCoefficientAct->act_addSampleCoefficient($set);
     if ($affectRow >= 1) {
         $status = '添加成功';
     } else {
         $status = '添加失败';
     }
     header("location:index.php?mod=sampleCoefficient&act=getSampleCoefficientList&status={$status}");
 }