Browse Source

第二步驳回

sugangqiang 2 years ago
parent
commit
7d15ea1ca2

+ 7 - 0
app/admin/controller/Talent.php

@@ -599,4 +599,11 @@ class Talent extends AdminController {
         }
     }
 
+    public function talentInfoExport() {
+        $title = ["t1", "t2"];
+        $data[] = [1, 2];
+        $data[] = [3, 4];
+        export($title, $data);
+    }
+
 }

+ 14 - 0
app/common.php

@@ -81,6 +81,20 @@ function getExcelDatas($filepath, $sheetIndex = 0) {
     return $sheet->toArray();
 }
 
+
+/**
+ * 
+ * @param type $title 标题
+ * @param type $data 数据
+ * @param type $detail 抬头内容 array(array(),array())
+ * @param string $filename 文件名
+ * @param type $format 数字格式化
+ * @param type $saveurl 输出方式
+ * @param type $author 作者
+ */
+function export($title, $data, $detail = null, $filename = "g2beauty", $freeze = null, $format = [], $saveurl = "php://output", $other_config = null, $author = "g2beauty.cn") {
+}
+
 /**
  * 检查是不是excel格式,不确定是否都是可用文件,主要还是第一和最后一个比较常见
  * @param type $mime

+ 2 - 2
app/enterprise/controller/Talent.php

@@ -30,8 +30,8 @@ class Talent extends EnterpriseController {
     public function second(\think\Request $request) {
         $params = $request->param();
         $id = $params["id"];
-        $info = self::chkIsOwner($id, $this->user["uid"]);
-        if (!$info) {
+        $info = \app\common\api\VerifyApi::getTalentInfoById($id);
+        if (!$info || $info["enterprise_id"] != $this->user["uid"]) {
             $res = ["msg" => "错误的访问方式"];
             echo sprintf("<script>parent.TalentInfoInfoDlg.infoCallback(%s);</script>", json_encode($res));
             exit;

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

@@ -53,7 +53,9 @@
                                                 <input type="hidden" name="enterprise_id" id="enterpriseId" value="{$row.enterprise.id}">
                                                 <input type="hidden" name="enterprise_type" id="type" value="{$row.enterprise.type}">
                                                 <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}">
-                                                <input type="hidden" name="realState" id="realState" value="{$row.realState}">
+                                                <input type="hidden" name="realState" id="realState" value="{$row.real_state}">
+                                                <input type="hidden" name="files" id="files" value="{$row.modify_files}">
+                                                <input type="hidden" name="fields" id="fields" value="{$row.modify_fields}">
                                                 <div class="col-sm-10">
                                                     <div class="rowGroup col-sm-3">
                                                         <label class=" control-label spacing"><span style="color: red">*</span>姓名</label>