Эх сурвалжийг харах

修复删除文件没有同步刷新界面导致重复删除提示错误

sugangqiang 2 жил өмнө
parent
commit
9018d247f4

+ 1 - 1
app/enterprise/api/TalentApi.php

@@ -21,7 +21,7 @@ class TalentApi {
      * @return boolean
      * @return boolean
      */
      */
     public static function checkIsEditable($id) {
     public static function checkIsEditable($id) {
-        $info = Talent::findOrEmpty($id);
+        $info = Talent::findOrEmpty($id)->toArray();
         if (!$info || $info["delete"] == 1 || !in_array($info["checkState"], [0, TalentState::FST_SAVE, TalentState::BASE_REVERIFY_PASS, TalentState::SCND_SAVE]))
         if (!$info || $info["delete"] == 1 || !in_array($info["checkState"], [0, TalentState::FST_SAVE, TalentState::BASE_REVERIFY_PASS, TalentState::SCND_SAVE]))
             return false;
             return false;
         return true;
         return true;

+ 1 - 1
public/static/modular/gate/enterprise/enterprise_change_edit.js

@@ -357,7 +357,7 @@ EpChangeEdit.deleteFile = function (id) {
     }
     }
     var operation = function () {
     var operation = function () {
         var ajax = new $ax("/common/api/deleteTalentCommonFile", function (data) {
         var ajax = new $ax("/common/api/deleteTalentCommonFile", function (data) {
-            if (data.code = 200) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 Feng.success(data.msg);
                 $("#fileTable").bootstrapTable("refresh", {});
                 $("#fileTable").bootstrapTable("refresh", {});
             } else {
             } else {

+ 1 - 1
public/static/modular/gate/enterprise/enterprise_change_edit1.js

@@ -279,7 +279,7 @@ EpChangeEdit.deleteFile = function (id) {
     }
     }
     var operation = function () {
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/api/talentCommonFile/deleteTalentCommonFile", function (data) {
         var ajax = new $ax(Feng.ctxPath + "/api/talentCommonFile/deleteTalentCommonFile", function (data) {
-            if (data.code = 200) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 Feng.success(data.msg);
                 $("#fileTable").bootstrapTable("refresh", {});
                 $("#fileTable").bootstrapTable("refresh", {});
             } else {
             } else {

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

@@ -449,7 +449,7 @@ IntegralInfoDlg.deleteFile = function (id, state) {
         return;
         return;
     var operation = function () {
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
-            if (data.code = 200) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 Feng.success(data.msg);
                 $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
                 $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
                 //$("#fileTable").bootstrapTable("refresh", {});
                 //$("#fileTable").bootstrapTable("refresh", {});

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

@@ -195,7 +195,7 @@ IntegralInfoDlg.deleteFile = function (id, state) {
         return;
         return;
     var operation = function () {
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
-            if (data.code = 200) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 Feng.success(data.msg);
                 $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
                 $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
                 //$("#fileTable").bootstrapTable("refresh", {});
                 //$("#fileTable").bootstrapTable("refresh", {});

+ 1 - 1
public/static/modular/gate/talentBase/talentInfo_info.js

@@ -761,7 +761,7 @@ TalentInfoInfoDlg.deleteFile = function (id, state) {
         return;
         return;
     var operation = function () {
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
-            if (data.code = 200) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 Feng.success(data.msg);
                 $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
                 $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
                 //$("#fileTable").bootstrapTable("refresh", {});
                 //$("#fileTable").bootstrapTable("refresh", {});

+ 1 - 1
public/static/modular/gate/talentInfo/new_talentInfo_info.js

@@ -981,7 +981,7 @@ TalentInfoInfoDlg.deleteFile = function (id, state) {
         return;
         return;
     var operation = function () {
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
-            if (data.code = 200) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 Feng.success(data.msg);
                 $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
                 $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
                 //$("#fileTable").bootstrapTable("refresh", {});
                 //$("#fileTable").bootstrapTable("refresh", {});

+ 1 - 1
public/static/modular/gate/talentInfo/talentInfo_ic_info.js

@@ -445,7 +445,7 @@ TalentInfoInfoDlg.deleteFile = function (id, state) {
         return;
         return;
     var operation = function () {
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
-            if (data.code = 200) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 Feng.success(data.msg);
                 $("#fileTable").bootstrapTable("refresh", {});
                 $("#fileTable").bootstrapTable("refresh", {});
             } else {
             } else {

+ 1 - 1
public/static/modular/gate/talentInfo/talentInfo_info.js

@@ -721,7 +721,7 @@ TalentInfoInfoDlg.deleteFile = function (id, state) {
         return;
         return;
     var operation = function () {
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteFile", function (data) {
-            if (data.code = 200) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 Feng.success(data.msg);
                 $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
                 $("input[name='uploadFiles[]'][value='" + id + "']").parents("li").remove();
                 //$("#fileTable").bootstrapTable("refresh", {});
                 //$("#fileTable").bootstrapTable("refresh", {});