sugangqiang 2 năm trước cách đây
mục cha
commit
c102e415f9

+ 4 - 0
app/common/api/IntegralRecordApi.php

@@ -31,6 +31,7 @@ class IntegralRecordApi {
         if (session("user")["usertype"] == 2) {
             $where[] = ["enterprise_id", "=", session("user")["uid"]];
         }
+        $where[] = ["delete", "=", 0];
         $count = IntegralRecord::where($where)->count();
         $list = IntegralRecord::where($where)->field("*,if(updateTime is not null,updateTime,createTime) as orderTime")->limit($offset, $limit)->order("orderTime " . $order)->select();
         foreach ($list as $key => $item) {
@@ -42,6 +43,9 @@ class IntegralRecordApi {
             }
             $list[$key]["details"] = implode(",", $tmp_items);
             $list[$key]["type"] = session("user")["type"];
+            $last_log = TalentLogApi::getLastLog($item["id"], \app\common\state\ProjectState::INTEGRAL);
+            $list[$key]["real_state"] = $last_log["state"];
+            $list[$key]["last_state"] = $last_log["last_state"];
         }
         return ["total" => $count, "rows" => $list];
     }

+ 1 - 0
app/common/controller/Api.php

@@ -95,6 +95,7 @@ class Api extends BaseController {
         $list = [];
         switch ($type) {
             case 1:
+            case 20:
                 $list = TalentLogApi::getList($type, $mainId);
                 break;
             case 10:

+ 1 - 1
app/enterprise/controller/Integral.php

@@ -131,7 +131,7 @@ class Integral extends EnterpriseController {
                 if (!$integralItemInfo) {
                     throw new ValidateException(sprintf("第%d个积分标准项不存在", $i + 1));
                 }
-                $ft_ids = array_filter(array_merge($ft_ids, array(explode(",", $integralItemInfo["fileTypeId"]))));
+                $ft_ids = array_filter(array_merge($ft_ids, (array) explode(",", $integralItemInfo["fileTypeId"])));
             }
             if (count($tmp_item_ids) != $detailCounts) {
                 throw new ValidateException("同一个申报中,同一个积分标准不能申报多次");

+ 1 - 1
public/static/modular/gate/integral/integralInfo.js

@@ -484,7 +484,7 @@ IntegralInfoDlg.validUploadButton = function (type, fileTypeId, fileId) {
     var checkState = $("#checkState").val();
     var realState = $("#realState").val();
     //console.log(checkState, realState);
-    if (Feng.isEmptyStr(checkState) || checkState == 0 || (checkState == 8 && realState == 8) || (checkState == 11 && realState != 14) || (realState == 11 && files.indexOf(fileTypeId.toString()) != -1)) {
+    if (Feng.isEmptyStr(checkState) || checkState == 0 || (checkState == 1 && realState == 1) || (checkState == 11 && realState != 14) || (realState == 11 && files.indexOf(fileTypeId.toString()) != -1)) {
         if (type == 1) {          //上传
             return "<button type='button' onclick=\"IntegralInfoDlg.checkFile(this," + fileTypeId + "," + null + ")\" style='margin-right: 10px' class=\"btn btn-xs btn-info\">" +
                     "<i class=\"fa fa-upload\"></i>上传" +