瀏覽代碼

注销申请

sugangqiang 1 年之前
父節點
當前提交
c85c5e2656

+ 5 - 5
app/admin/controller/Enterprise.php

@@ -376,7 +376,7 @@ class Enterprise extends AdminController {
                         'id' => getStringId(),
                         'mainId' => $id,
                         'type' => 10,
-                        'typeField' => null,
+                        'typeFileId' => null,
                         'active' => 1,
                         'state' => $newCheckState,
                         'step' => 101,
@@ -414,7 +414,7 @@ class Enterprise extends AdminController {
                         'id' => getStringId(),
                         'mainId' => $id,
                         'type' => 10,
-                        'typeField' => null,
+                        'typeFileId' => null,
                         'active' => 0,
                         'state' => $newCheckState,
                         'step' => 101,
@@ -540,7 +540,7 @@ class Enterprise extends AdminController {
                 'id' => getStringId(),
                 'mainId' => $id,
                 'type' => 10,
-                'typeField' => null,
+                'typeFileId' => null,
                 'active' => 1,
                 'state' => 2,
                 'step' => 101,
@@ -625,7 +625,7 @@ class Enterprise extends AdminController {
                 'id' => getStringId(),
                 'mainId' => $ep['id'],
                 'type' => 10,
-                'typeField' => null,
+                'typeFileId' => null,
                 'active' => 1,
                 'state' => TalentState::RCRD_BASEIC_FROZEN,
                 'step' => 102,
@@ -659,7 +659,7 @@ class Enterprise extends AdminController {
             'id' => getStringId(),
             'mainId' => $ep['id'],
             'type' => 10,
-            'typeField' => null,
+            'typeFileId' => null,
             'active' => 1,
             'state' => null,
             'step' => 103,

+ 3 - 3
app/admin/controller/EnterpriseChangeRecord.php

@@ -532,7 +532,7 @@ class EnterpriseChangeRecord extends AdminController {
                         'category' => 'enterprise_change',
                         'mainId' => $ecr['id'],
                         'type' => 10,
-                        'typeField' => null,
+                        'typeFileId' => null,
                         'active' => 1,
                         'state' => $newCheckState,
                         'step' => 101,
@@ -627,7 +627,7 @@ class EnterpriseChangeRecord extends AdminController {
                         'category' => 'enterprise_change',
                         'mainId' => $ecr['id'],
                         'type' => 10,
-                        'typeField' => null,
+                        'typeFileId' => null,
                         'active' => 1,
                         'state' => $newCheckState,
                         'step' => 101,
@@ -662,7 +662,7 @@ class EnterpriseChangeRecord extends AdminController {
                     'category' => 'enterprise_change',
                     'mainId' => $ecr['id'],
                     'type' => 10,
-                    'typeField' => null,
+                    'typeFileId' => null,
                     'active' => 0,
                     'state' => $newCheckState,
                     'step' => 101,

+ 192 - 0
app/admin/controller/EnterpriseCloseAccount.php

@@ -0,0 +1,192 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\admin\common\AdminController;
+
+/**
+ * Description of EnterpriseCloseAccount
+ *
+ * @author sgq
+ */
+class EnterpriseCloseAccount extends AdminController {
+
+    public function index() {
+        return view("", ["type" => $this->user["type"]]);
+    }
+
+    public function list() {
+        $params = $this->request->param();
+        $offset = $params["offset"] ?: 0;
+        $order = $params["order"] ?: "desc";
+        $limit = $params["limit"] ?: 10;
+        $where = $this->setTalentQuit($params);
+        $where[] = ["type", "=", $this->user["type"]];
+        $where[] = ["delete", "=", 0];
+        //获取字典表人才层次
+        $levelMap = DictApi::selectByParentCode("talent_arrange");
+        $typeMap = DictApi::selectByParentCode("enterprise_tag");
+        $count = TqModel::where($where)->count();
+        $list = TqModel::where($where)->limit($offset, $limit)->order("createTime {$order}")->select()->toArray();
+        foreach ($list as $key => $item) {
+            $list[$key]["talentArrangeName"] = $levelMap[$item["talentArrange"]];
+            $list[$key]["talentTypeName"] = $typeMap[$item["talentType"]];
+        }
+
+        return json(["rows" => $list, "total" => $count]);
+    }
+
+    public function check() {
+        $id = $this->request["id"];
+        $info = TqModel::where("id", $id)->find();
+        $info["talentArrangeName"] = DictApi::selectByParentCode("talent_arrange")[$info["talentArrange"]];
+        if (\StrUtil::isNotEmpAndNull($info["talentType"])) {
+            $info["talentTypeName"] = DictApi::selectByParentCode("enterprise_tag")[$info["talentType"]];
+        }
+        return view("check", ["type" => $this->user["type"], "row" => $info]);
+    }
+
+    public function submitToCheck() {
+        $responseObj = new \stdClass();
+        $responseObj->code = 500;
+        $id = $this->request["id"];
+        $checkState = $this->request["checkState"];
+        $checkMsg = $this->request["checkMsg"];
+        $info = TqModel::where("id", $id)->find();
+        if (!$info) {
+            $responseObj->msg = "系统错误,请联系管理员";
+            return $responseObj;
+        }
+        if (!$checkState) {
+            $responseObj->msg = "请选择审核状态";
+            return $responseObj;
+        }
+        Db::startTrans();
+        try {
+            //添加日志
+            $user = $this->user;
+            $log["id"] = getStringId();
+            $log["active"] = 1;
+            $log["state"] = $checkState;
+            $log["step"] = 11;
+            $log["stateChange"] = MainState::getStateName($info["checkState"]) . "->" . MainState::getStateName($checkState);
+            $log["type"] = ProjectState::QUIT;
+            $log["mainId"] = $id;
+            $log["description"] = $checkMsg;
+            $log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+            $log["createTime"] = date("Y-m-d H:i:s");
+            $updTalentQuit["id"] = $id;
+            $updTalentQuit["checkState"] = $checkState;
+            $updTalentQuit["checkMsg"] = $checkMsg;
+            if ($checkState == 3) {
+                //修改人才库信息
+                $upd["id"] = $info["talentId"];
+                $upd["active"] = 2;
+                $upd["cur_quit_time"] = $info["quitTime"];
+                Db::table("new_talent_info")->save($upd);
+
+                $talentLog["id"] = getStringId();
+                $talentLog["active"] = 1;
+                $talentLog["step"] = 22;
+                $talentLog["type"] = ProjectState::TALENT;
+                $talentLog["mainId"] = $info["talentId"];
+                $talentLog["description"] = "离职变更通过,同步到人才库";
+                $talentLog["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
+                $talentLog["createTime"] = date("Y-m-d H:i:s");
+                Db::table("new_talent_checklog")->insert($talentLog);
+                $updTalentQuit["passTime"] = date("Y-m-d H:i:s");
+            }
+            Db::table("new_talent_checklog")->insert($log);
+            Db::table("un_talent_quit")->save($updTalentQuit);
+            $responseObj->code = 200;
+            $responseObj->msg = "审核成功";
+
+            Db::commit();
+            return $responseObj;
+        } catch (\think\db\exception\DbException $e) {
+            $responseObj->msg = $e->getMessage();
+            Db::rollback();
+            return $responseObj;
+        }
+    }
+
+    public function export() {
+        $request = $this->request;
+        $data["talentName"] = \StrUtil::getRequestDecodeParam($request, "talentName");
+        $data["idCard"] = \StrUtil::getRequestDecodeParam($request, "idCard");
+        $data["enterpriseName"] = \StrUtil::getRequestDecodeParam($request, "enterpriseName");
+        $data["talentArrange"] = \StrUtil::getRequestDecodeParam($request, "talentArrange");
+        $data["checkState"] = \StrUtil::getRequestDecodeParam($request, "checkState");
+        $where = $this->setTalentQuit($data);
+        $where[] = ["type", "=", $this->user["type"]];
+        $where[] = ["delete", "=", 0];
+
+        $list = TqModel::where($where)->select()->toArray();
+        $levelMap = DictApi::selectByParentCode("talent_arrange");
+
+        if ($this->user["type"] == 1) {
+            $title = ["姓名", "证件号码", "工作单位", "人才层次", "认定时间", "合同开始时间", "合同截止时间", "入职时间", "离职时间", "离职申报原因",
+                "手机号码", "审核状态", "审核意见", "审核通过时间"];
+            $keys = ["talentName", "idCard", "enterpriseName", "talentArrangeName", "identifyTime", "starttime", "endtime", "entryTime", "quitTime", "quitReason",
+                "phone", "checkStateName", "checkMsg", "passTime"];
+        } else {
+            $title = ["姓名", "证件号码", "工作单位", "人才层次", "认定时间", "合同开始时间", "合同截止时间", "入职时间", "离职时间",
+                "手机号码", "审核状态", "审核意见", "审核通过时间"];
+            $keys = ["talentName", "idCard", "enterpriseName", "talentArrangeName", "identifyTime", "starttime", "endtime", "entryTime", "quitTime",
+                "phone", "checkStateName", "checkMsg", "passTime"];
+        }
+        $rows = [];
+        foreach ($list as &$item) {
+            $item["talentArrangeName"] = $levelMap[$item["talentArrange"]];
+            switch ($item["checkState"]) {
+                case -1:
+                    $item["checkStateName"] = "待提交";
+                    break;
+                case 1:
+                    $item["checkStateName"] = "待审核";
+                    break;
+                case 2:
+                    $item["checkStateName"] = "审核驳回";
+                    break;
+                case 3:
+                    $item["checkStateName"] = "已通过";
+                    break;
+                case 9:
+                    $item["checkStateName"] = "重新提交";
+                    break;
+            }
+            $row = [];
+            for ($i = 0; $i < count($keys); $i++) {
+                $row[] = $item[$keys[$i]];
+            }
+            $rows[] = $row;
+        }unset($item);
+
+        if (!$rows) {
+            return json(["msg" => "没有可导出的内容"]);
+        }
+        $fileName = "离职变更列表";
+        export($title, $rows, $fileName);
+    }
+
+    private function setTalentQuit($talentQuitInfo) {
+        $where = [];
+        if (\StrUtil::isNotEmpAndNull($talentQuitInfo["talentName"])) {
+            $where[] = ["talentName", "=", $talentQuitInfo["talentName"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentQuitInfo["idCard"])) {
+            $where[] = ["idCard", "=", $talentQuitInfo["IdCard"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentQuitInfo["enterpriseName"])) {
+            $where[] = ["enterpriseName", "=", $talentQuitInfo["enterpriseName"]];
+        }
+        if (\StrUtil::isNotEmpAndNull($talentQuitInfo["talentArrange"])) {
+            $where[] = ["talentArrange", "=", $talentQuitInfo["talentArrange"]];
+        }
+        if ($talentQuitInfo["checkState"] != null) {
+            $where[] = ["checkState", "=", $talentQuitInfo["checkState"]];
+        }
+        return $where;
+    }
+
+}

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

@@ -901,7 +901,7 @@ class Api extends BaseController {
                 'category' => 'enterprise_change',
                 'mainId' => $ep->id,
                 'type' => 10,
-                'typeField' => null,
+                'typeFileId' => null,
                 'active' => 1,
                 'state' => 1,
                 'step' => 100,

+ 2 - 2
app/common/controller/Auth.php

@@ -345,7 +345,7 @@ class Auth extends BaseController {
                     'id' => getStringId(),
                     'mainId' => $data['id'],
                     'type' => 10,
-                    'typeField' => null,
+                    'typeFileId' => null,
                     'active' => 1,
                     'state' => 1,
                     'step' => 100,
@@ -550,7 +550,7 @@ class Auth extends BaseController {
                     'id' => getStringId(),
                     'mainId' => $data['id'],
                     'type' => 10,
-                    'typeField' => null,
+                    'typeFileId' => null,
                     'active' => 1,
                     'state' => 4,
                     'step' => 100,

+ 96 - 0
app/enterprise/controller/Api.php

@@ -15,6 +15,7 @@ use think\exception\ValidateException;
 use app\common\api\UploadApi;
 use app\common\state\CommonConst;
 use app\common\api\LocationApi;
+use think\facade\Db;
 
 class Api extends EnterpriseController {
 
@@ -1091,4 +1092,99 @@ class Api extends EnterpriseController {
         }
     }
 
+    //注销账号
+    public function closeAccount() {
+        $user = $this->user;
+        $table = "un_enterpriseclose_record";
+        $response = new \stdClass();
+        $response->code = 500;
+        $where = [];
+        $where[] = ["enterpriseId", "=", $user["uid"]];
+        $record = Db::table($table)->where($where)->order("createTime desc")->find();
+        if ($record) {
+            $record["files"] = json_decode($record["files"], true);
+        }
+        $ep = EnterpriseApi::getOne($user["uid"]);
+        if ($record["checkState"] == 3 || !$ep) {
+            $response->msg = "该账号不存在";
+            return \StrUtil::back($response, "EnterpriseCenter.callback");
+        }
+        if ($record["checkState"] == 1 || $record["checkState"] == 9) {
+            $response->msg = "您的注销申请正在审核中,请耐心等候!";
+            return \StrUtil::back($response, "EnterpriseCenter.callback");
+        }
+        $reason = \StrUtil::getRequestDecodeParam($this->request, "reason");
+        if (!$reason) {
+            $response->msg = "注销原因不能为空";
+            return \StrUtil::back($response, "EnterpriseCenter.callback");
+        }
+        if (!$tmp && !$record["files"]) {
+            $response->msg = "请上传附件";
+            return \StrUtil::back($response, "EnterpriseCenter.callback");
+        }
+
+        $upload = new \app\common\api\UploadApi();
+        $files = $this->request->file("closeAccountFiles");
+
+        $tmp = [];
+        foreach ($files as $file) {
+            $result = $upload->uploadOne($file, "image", "enterprise/close_account_files");
+            if ($result->code != 200) {
+                $response->msg = $result->msg;
+                return \StrUtil::back($response, "EnterpriseCenter.callback");
+            }
+            $tmp[] = $result->filepath;
+        }
+        Db::startTrans();
+        try {
+            if (\StrUtil::isEmpOrNull($record["firstSubmitTime"])) {
+                $data["firstSubmitTime"] = date("Y-m-d H:i:s");
+            }
+            $data["newSubmitTime"] = date("Y-m-d H:i:s");
+            $data["reason"] = $reason;
+            $data["files"] = $tmp ? json_encode($tmp) : $record["files"];
+            $data["checkState"] = $record["checkState"] == 2 ? 9 : 1;
+            if ($record["id"]) {
+                $data["id"] = $record["id"];
+                $data["updateTime"] = date("Y-m-d H:i:s");
+                $data["updateUser"] = $user["uid"];
+                $res = Db::table($table)->save($data);
+            } else {
+                $data["id"] = getStringId();
+                $data["name"] = $ep["name"];
+                $data["username"] = $ep["username"];
+                $data["idCard"] = $ep["idCard"];
+                $data["type"] = $ep["type"];
+                $data["enterpriseId"] = $user["uid"];
+                $data["createTime"] = date("Y-m-d H:i:s");
+                $data["createUser"] = $user["uid"];
+                $res = Db::table($table)->insert($data);
+            }
+            $newLog = [
+                'id' => getStringId(),
+                'mainId' => $data["id"],
+                'category' => 'enterprise_change',
+                'type' => 10,
+                'typeFileId' => null,
+                'active' => 1,
+                'state' => 1,
+                'step' => 100,
+                'stateChange' => '',
+                'description' => $record["checkState"] == 2 ? '用户重新提交账户注销申请' : '用户提交账户注销申请',
+                'createTime' => date("Y-m-d H:i:s"),
+                'createUser' => $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统"
+            ];
+
+            $res = Db::table("new_talent_checklog")->insert($newLog);
+            $response->msg = "注销申请提交成功,请耐心等待审核";
+            $response->code = 200;
+            Db::commit();
+            return \StrUtil::back($response, "EnterpriseCenter.callback");
+        } catch (\think\db\exception\DbException $e) {
+            Db::rollback();
+            $response->msg = $e->getMessage();
+            return \StrUtil::back($response, "EnterpriseCenter.callback");
+        }
+    }
+
 }

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

@@ -224,7 +224,7 @@ class Hospital extends EnterpriseController {
                         'id' => getStringId(),
                         'mainId' => $id,
                         'type' => 10,
-                        'typeField' => null,
+                        'typeFileId' => null,
                         'active' => 1,
                         'state' => $newCheckState,
                         'step' => 101,
@@ -262,7 +262,7 @@ class Hospital extends EnterpriseController {
                         'id' => getStringId(),
                         'mainId' => $id,
                         'type' => 10,
-                        'typeField' => null,
+                        'typeFileId' => null,
                         'active' => 0,
                         'state' => $newCheckState,
                         'step' => 101,

+ 8 - 1
app/enterprise/controller/Index.php

@@ -156,7 +156,14 @@ class Index extends EnterpriseController {
             $ep["fullLocationName"] = implode("", $area);
         }
 
-        return view($template, ['ep' => $ep]);
+        $where = [];
+        $where[] = ["enterpriseId", "=", $this->user["id"]];
+        $closeAccountRecord = \think\facade\Db::table("un_enterpriseclose_record")->where($where)->order("createTime desc")->find();
+        if ($closeAccountRecord["files"]) {
+            $closeAccountRecord["files"] = json_decode($closeAccountRecord["files"], true);
+        }
+
+        return view($template, ['ep' => $ep, 'closeAccountRecord' => $closeAccountRecord]);
     }
 
 }

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

@@ -65,7 +65,7 @@ class TalentTypeChange extends EnterpriseController {
             'id' => getStringId(),
             'mainId' => $data['id'],
             'type' => intval(ProjectState::LEVELCHANGE),
-            'typeField' => null,
+            'typeFileId' => null,
             'active' => 1,
             'state' => null,
             'step' => 0,

+ 80 - 1
app/enterprise/view/index/center_page.html

@@ -24,6 +24,8 @@
     .value1{
         width: 240px;
     }
+    #fileList li{width:80px;height:80px;float:left;margin:10px;overflow:hidden;}
+    #fileList li img{width:80px;}
 </style>
 <div class="ibox float-e-margins">
     <div class="ibox-title">
@@ -38,6 +40,7 @@
                             <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">基本信息</a></li>
                             <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">机构信息变更</a></li>
                             <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">修改密码</a></li>
+                            <li class=""><a data-toggle="tab" href="#tab-5" aria-expanded="false">账号注销</a></li>
                             <!--              <li class="" ><a data-toggle="tab" href="#tab-4" aria-expanded="false">绑定聚才网账号</a></li>-->
                         </ul>
                         <div class="tab-content">
@@ -147,7 +150,7 @@
                                                     {eq name="ep.special" value="1"}
                                                     <td class="key">单位标签</td>                                                            
                                                     <td>{$ep.institutionTagName}</td>
-                                                {/eq}
+                                                    {/eq}
                                                 </tr>
                                             </table>
                                             {eq name="ep.special" value="0"}
@@ -381,6 +384,82 @@
                                     </div>
                                 </div>
                             </div>
+                            <div id="tab-5" class="tab-pane">
+                                <div class="panel-body" style="width:900px;">
+                                    <form id="EpCloseForm" autocomplete="off" action="/enterprise/api/closeAccount" method="post" enctype="multipart/form-data" target="hiddenIframe">
+                                        <br/>
+                                        <div class="row m-b-sm">
+                                            <div class="col-sm-12">
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label">账号</label>
+                                                    <div class="col-sm-10">
+                                                        <div class="form-control" style="background:#f2f2f2;">
+                                                            {$ep.username}
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="row m-b-sm">
+                                            <div class="col-sm-12">
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label">{eq name="ep.special" value="0"}企业{else/}单位{/eq}名称</label>
+                                                    <div class="col-sm-10">
+                                                        <div class="form-control" style="background:#f2f2f2;">
+                                                            {$ep.name}
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="row m-b-sm">
+                                            <div class="col-sm-12">
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label">统一社会信用代码</label>
+                                                    <div class="col-sm-10">
+                                                        <div class="form-control" style="background:#f2f2f2;">
+                                                            {$ep.idCard}
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <br/>
+                                        <div class="hr-line-dashed"></div>
+                                        <div class="row m-b-sm">
+                                            <div class="col-sm-12">
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label">注销原因</label>
+                                                    <div class="col-sm-10">
+                                                        <textarea class="form-control" rows="5" id="reason" name="reason"></textarea>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="row">
+                                            <div class="col-sm-12">
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-2 control-label">附件</label>
+                                                    <div class="col-sm-10">
+                                                        <button type="button" id="close-uploader-btn" class="btn" onclick="$('#close-uploader').click();">上传附件</button>
+                                                        <input type="file" multiple="" id="close-uploader" name="closeAccountFiles[]" class="btn" style="display:none;" />
+                                                    </div>
+                                                    <div id="fileList">
+                                                        <ul>
+                                                            
+                                                        </ul>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <br/>
+                                        <div style="width:100%; text-align: center;">
+                                            <button type="button" class="btn btn-w-m btn-primary" style="width:200px;" onclick="EnterpriseCenter.closeAccount()">注销账号</button>
+                                        </div>
+                                    </form>
+                                    <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
+                                </div>
+                            </div>
                         </div>
                     </div>
                 </div>

+ 1 - 1
app/job/Import.php

@@ -151,7 +151,7 @@ class Import {
                                 'id' => getStringId(),
                                 'mainId' => $item['id'],
                                 'type' => 10,
-                                'typeField' => null,
+                                'typeFileId' => null,
                                 'active' => 1,
                                 'state' => 1,
                                 'step' => 100,

+ 63 - 0
public/static/modular/gate/enterprise/enterprise_center.js

@@ -295,6 +295,69 @@ EnterpriseCenter.bindJcAccount = function () {
     ajax.start();
 }
 
+var lock = false;
+EnterpriseCenter.closeAccount = function () {
+    Feng.confirm("是否确定提交注销申请?", function () {
+        var reason = $("#reason").val().trim();
+        if (reason == "") {
+            Feng.info("注销原因不能为空");
+            return;
+        }
+        if ($("#fileList ul li").length() == 0 && document.getElementById("close-uploader").files.length == 0) {
+            Feng.info("请上传附件");
+            return;
+        }
+        if (!lock) {
+            //lock = true;
+            $("#close-uploader-btn").prop("disabled", true);
+        } else {
+            Feng.info("不能重复点击");
+            return;
+        }
+        $("#EpCloseForm")[0].submit();
+    })
+}
+
+EnterpriseCenter.callback = function (data) {
+    lock = false;
+    $("#close-uploader-btn").removeAttr("disabled");
+    Feng.info(data.msg);
+}
+
+$("#close-uploader").change(function (e) {
+    var that = this;
+    var files = that.files;
+    var totalSize = 0;
+    for (var i = 0; i < files.length; i++) {
+        if (!Feng.chkFileInvalid(files[i], 5, 10)) {
+            return;
+        }
+        totalSize += files[i].size;
+    }
+    if (totalSize > 10 * 1024 * 1024) {
+        Feng.error("所有附件大小不能超过10MB");
+        return;
+    }
+    $("#fileList ul").html("");
+    for (var i = 0; i < files.length; i++) {
+        var file = files[i];
+        var imgSrc;
+        var reader = new FileReader();
+        reader.readAsDataURL(file);
+        reader.onload = function () {
+            if (Feng.isImg(file.type)) {
+                imgSrc = this.result;
+                var li = '<li><img src="' + imgSrc + '"/></li>';
+                $("#fileList ul").append(li);
+            } else {
+                var li = '<li><img src="/static/img/Pdf.png"/></li>';
+                $("#fileList ul").append(li);
+            }
+        };
+    }
+
+});
+
 $(function () {
     var defaultColunms = EnterpriseCenter.initColumn();
     var table = new BSTable(EnterpriseCenter.id, "/enterprise/api/findEnterpriseChangeByPage", defaultColunms);