浏览代码

修复一些bug

sandm 2 年之前
父节点
当前提交
81233d6167

+ 4 - 3
app/enterprise/controller/Talent.php

@@ -127,7 +127,7 @@ class Talent extends EnterpriseController {
             $where[] = ["type", "=", $this->user["type"]];
             $where[] = ["must", "=", 1];
             if ($whr) {
-                $filetypes = Db::table("new_common_filetype")->whereOr([$where, $whr])->select()->toArray();
+                $filetypes = Db::table("new_common_filetype")->where([$where, $whr])->select()->toArray();
             } else {
                 $filetypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
             }
@@ -139,7 +139,8 @@ class Talent extends EnterpriseController {
             $upload_type_counts = count($distinct_filetypes);
 
             if ($upload_type_counts != count($ft_ids)) {
-                $res = ["msg" => "请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"];
+                $test = count($ft_ids);
+                $res = ["msg" => "{$upload_type_counts}-{$test}请留意附件上传栏中带*号的内容均为必传项,请上传完整再提交审核"];
                 echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
                 exit;
             }
@@ -197,7 +198,7 @@ class Talent extends EnterpriseController {
             $where[] = ["type", "=", $this->user["type"]];
             $where[] = ["must", "=", 1];
             if ($whr) {
-                $filetypes = Db::table("new_common_filetype")->whereOr([$where, $whr])->select()->toArray();
+                $filetypes = Db::table("new_common_filetype")->where([$where, $whr])->select()->toArray();
             } else {
                 $filetypes = Db::table("new_common_filetype")->where($where)->select()->toArray();
             }

+ 3 - 0
app/enterprise/view/talent/second.html

@@ -46,6 +46,9 @@
         word-wrap:break-word;
         word-break:break-all;
     }
+    ul{
+        padding: 0;
+    }
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-content">

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

@@ -333,9 +333,9 @@ TalentInfoInfoDlg.initFileTable = function () {
 
                             html += '<li data-id="' + files[key].id + '">\n\
                                     <div>' + (data[k].step != 1 ? '<input type="hidden" name="uploadFiles[]" value="' + files[key].id + '">' : "") + '</div>\n' +
-                                    '<div style="width: 80%;">' + files[key].orignName + '</div>\n' +
+                                    '<div style="width: 70%;">' + files[key].orignName + '</div>\n' +
                                     '<div style="width: 10%;">' + imgStr + '</div>\n' +
-                                    '<div style="width: 10%;">' + btn + '</div>\n\
+                                    '<div style="width: 20%;">' + btn + '</div>\n\
                                     </li>';
                         }
                         html = html + '</ul>';
@@ -454,7 +454,7 @@ TalentInfoInfoDlg.getIdentifyNeedsFileTypes = function () {
                                 <td style="text-align: center; vertical-align: middle; width: 8%; ">' + (filetype.templateUrl ? templateUrl : "无") + '</td> \n\
                                 <td class="uitd_showTip" style="text-align: center; vertical-align: middle; width: 52%; ">' + filetype.description + '</td> \n\
                                 <td style="text-align: center; vertical-align: middle; width: 10%; ">' + uploadbtn + '</td> </tr></tr>';
-            html += '<tr class="detail-view"><td colspan="5"><ul class="imgs"><li style="width: 80%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">操作</li>';
+            html += '<tr class="detail-view"><td colspan="5"><ul class="imgs"><li style="width: 70%;font-weight: bold;padding-top: 5px;">附件原名</li><li style="width: 10%;font-weight: bold;padding-top: 5px;">预览</li><li style="width: 20%;font-weight: bold;padding-top: 5px;">操作</li>';
 
             for (var k in filetype.files) {
                 var file = filetype.files[k];
@@ -739,9 +739,9 @@ TalentInfoInfoDlg.callBack = function (data) {
         } else {
             var html = '<li data-id="' + data.id + '">\n\
 <div><input type="hidden" name="uploadFiles[]" value="' + data.id + '"></div>\n\
-<div style="width: 80%;">' + data.orignName + '</div>\n\
+<div style="width: 70%;">' + data.orignName + '</div>\n\
 <div style="width: 10%;">' + imgStr + '</div>\n\
-<div style="width: 10%;">\n\
+<div style="width: 20%;">\n\
 <button type="button" onclick="TalentInfoInfoDlg.checkFile(this,' + data.typeId + ',' + data.id + ',' + tableIndex + ',' + trIndex + ')" style="margin-right: 10px" class="btn btn-xs btn-info"><i class="fa fa-paste"></i>修改</button>\n\
 <button type="button" onclick="TalentInfoInfoDlg.deleteFile(' + data.id + ')" class="btn btn-xs btn-danger"><i class="fa fa-times"></i>删除</button>\n\
 </div></li></ul>';