sugangqiang 1 ano atrás
pai
commit
d192abdade

+ 11 - 0
app/admin/view/talent_allowance/info.html

@@ -308,6 +308,17 @@
                                         <input type="type" name="type" value="8">
                                     </form>
                                 </div>
+                            </div>                            
+                            <div class="panel panel-default">
+                                <div class="panel-heading" onclick="$(this).next().toggle()">
+                                    <h3 class="panel-title">
+                                        通用附件
+                                    </h3>
+                                </div>
+                                <div class="panel-body">
+                                    <table id="commonFileTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;">
+                                    </table>
+                                </div>
                             </div>
                             <div class="panel panel-default">
                                 <div class="panel-heading" onclick="$(this).next().toggle()">

+ 11 - 0
app/admin/view/talent_allowance/public_check.html

@@ -317,6 +317,17 @@
                                     </form>
                                 </div>
                             </div>
+                            <div class="panel panel-default">
+                                <div class="panel-heading" onclick="$(this).next().toggle()">
+                                    <h3 class="panel-title">
+                                        通用附件
+                                    </h3>
+                                </div>
+                                <div class="panel-body">
+                                    <table id="commonFileTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;">
+                                    </table>
+                                </div>
+                            </div>
                             <div class="panel panel-default">
                                 <div class="panel-heading" onclick="$(this).next().toggle()">
                                     <h3 class="panel-title">

+ 11 - 0
app/admin/view/talent_allowance/select.html

@@ -356,6 +356,17 @@
                                     </form>
                                 </div>
                             </div>
+                            <div class="panel panel-default">
+                                <div class="panel-heading" onclick="$(this).next().toggle()">
+                                    <h3 class="panel-title">
+                                        通用附件
+                                    </h3>
+                                </div>
+                                <div class="panel-body">
+                                    <table id="commonFileTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;">
+                                    </table>
+                                </div>
+                            </div>
                         </div>
                     </div>
                 </div>

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

@@ -535,6 +535,22 @@ class Api extends BaseController {
         return json(["rows" => $list]);
     }
 
+    public function listTalentAllowanceCommonFile() {
+        $param = $this->request->param();
+        $id = $param["id"];
+        $info = \app\common\api\TalentAllowanceApi::getInfoById($id);
+        $list = [];
+        if ($info) {
+            $where = [["batch", "=", $info["year"]], ["enterpriseId", "=", $info["enterpriseId"]]];
+            $list = Db::table("un_talent_allowance_common_file")->where($where)->select()->toArray();
+            foreach ($list as $key => $item) {
+                $list[$key]["ext"] = pathinfo($item["url"])["extension"];
+                $list[$key]["url"] = getStoragePath($item["url"]);
+            }
+        }
+        return json(["rows" => $list]);
+    }
+
     public function addTalentFile() {
         $backName = $this->request->param("backName");
         $fileId = $this->request->param("fileId");

+ 123 - 1
app/enterprise/controller/TalentAllowance.php

@@ -20,6 +20,8 @@ use app\common\state\AllowanceProjectEnum;
 use app\common\model\TalentChecklog;
 use think\facade\Db;
 use app\common\api\Response;
+use app\common\api\UploadApi;
+use app\enterprise\model\TalentTypeChange;
 
 /**
  * Description of TalentAllowance
@@ -61,6 +63,22 @@ class TalentAllowance extends EnterpriseController {
         return view("", ["year" => $batch, "type" => $this->user["type"], "row" => $info]);
     }
 
+    public function batchApply() {
+        $ids = $this->request["ids"];
+        $ids = array_filter(explode(",", $ids));
+        $allowanceType = $this->request["allowanceType"];
+
+        $batch = BatchApi::getValidBatch(ProjectState::JBT, $this->user["type"])["batch"];
+        if (!$batch) {
+            return new Response(Response::ERROR, "当前并无有效的申报批次进行中");
+        }
+
+        for ($i = 0; $i < count($ids); $i++) {
+            queue("app\job\TalentAllowance", ["type" => 1, "talentId" => $ids[$i], "enterprise" => $this->user, "year" => $batch, "allowanceType" => $allowanceType]);
+        }
+        return new Response(Response::SUCCESS, "已经成功添加到计划任务,请稍候查看申报列表进行确认");
+    }
+
     private function save($talentAllowance, \think\Request $request) {
         $response = new \stdClass();
         $response->code = 500;
@@ -247,7 +265,7 @@ class TalentAllowance extends EnterpriseController {
         $where[] = ["checkState", "=", MainState::PASS];
         $where[] = ["isPublic", ">=", 5];
         $where[] = ["oldIdentifyMonth", "<=", $info["year"] . "-12-31"];
-        $typeList = \app\enterprise\model\TalentTypeChange::where($where)->field("oldTalentArrange,oldIdentifyCondition,oldIdentifyGetTime,oldIdentifyOutTime,oldIdentifyMonth,oldCertificateStartTime,oldCertificateOutTime,newIdentifyMonth")->order("createTime desc")->select()->toArray();
+        $typeList = TalentTypeChange::where($where)->field("oldTalentArrange,oldIdentifyCondition,oldIdentifyGetTime,oldIdentifyOutTime,oldIdentifyMonth,oldCertificateStartTime,oldCertificateOutTime,newIdentifyMonth")->order("createTime desc")->select()->toArray();
         $typeList[] = [
             "oldTalentArrange" => $talentInfo["talent_arrange"],
             "oldIdentifyCondition" => $talentInfo["talent_condition"],
@@ -680,4 +698,108 @@ class TalentAllowance extends EnterpriseController {
         return $response;
     }
 
+    public function uploadCommonFile() {
+        $batchId = $this->request["batch"];
+        if (!$batchId) {
+            return json(new Response(Response::ERROR, "没有提交批次信息,无法按批次归档,上传被中止"));
+        }
+        $batchInfo = BatchApi::getOne($batchId);
+
+        if (!$batchInfo) {
+            return json(new Response(Response::ERROR, "批次信息不存在,无法按批次归档,上传被中止"));
+        }
+
+        if (!$this->request->file()) {
+            return json(new Response(Response::ERROR, "没有上传任何材料"));
+        }
+        $file = $this->request->file("file");
+        $upload = new UploadApi();
+        $result = $upload->uploadOne($file, "system", "talent/TalentAllowanceCommonFile");
+        if ($result->code != 200) {
+            return json(new Response(Response::ERROR, $result->msg));
+        }
+        $data["id"] = getStringId();
+        $data["enterpriseId"] = $this->user["uid"];
+        $data["batchId"] = $batchId;
+        $data["batch"] = $batchInfo["batch"];
+        $data["url"] = $result->filepath;
+        $data["originalName"] = $file->getOriginalName();
+        $data["createTime"] = date("Y-m-d H:i:s");
+        $data["createUser"] = $this->user["uid"];
+        $res = Db::table("un_talent_allowance_common_file")->insert($data);
+
+        return json(new Response(Response::SUCCESS, "上传成功"));
+    }
+
+    public function listCommonFile() {
+        $param = $this->request->param();
+        $batchId = $param["batch"];
+        $where = [["batchId", "=", $batchId], ["enterpriseId", "=", $this->user["uid"]]];
+        $list = Db::table("un_talent_allowance_common_file")->where($where)->select()->toArray();
+        foreach ($list as $key => $item) {
+            $list[$key]["ext"] = pathinfo($item["url"])["extension"];
+            $list[$key]["url"] = getStoragePath($item["url"]);
+        }
+        return json(["rows" => $list]);
+    }
+
+    public function deleteCommonFile() {
+        $id = $this->request["id"];
+        $where = [];
+        $where[] = ["id", "=", $id];
+        $where[] = ["enterpriseId", "=", $this->user["uid"]];
+        $file = Db::table("un_talent_allowance_common_file")->where($where)->find();
+        if (!$file) {
+            return json(new Response(Response::ERROR, "不存在的文件,删除失败"));
+        }
+        if (Db::table("un_talent_allowance_common_file")->where($where)->delete()) {
+            if (!empty($file["url"])) {
+                $filepath = "storage/" . $file["url"];
+                if (file_exists($filepath)) {
+                    unlink($filepath);
+                }
+            }
+            return json(new Response(Response::SUCCESS, "删除成功"));
+        }
+    }
+
+    public function findTalentAllowance() {
+        $res = [];
+        $batch = BatchApi::getValidBatch(ProjectState::JBT, $this->user["type"]);
+        $year = $batch["batch"];
+        if ($year) {
+            $ids = null;
+            //根据申报年度查询当前企业已申报的人才
+            $where = [];
+            $where[] = ["year", "=", $year];
+            $where[] = ["enterpriseId", "=", $this->user["uid"]];
+            $talentAllowances = TaModel::where($where)->select()->toArray();
+            $ids = array_unique(array_column($talentAllowances, "talentId"));
+            $whr = [];
+            $whr[] = ["ti.checkState", "=", \app\common\api\TalentState::CERTIFICATED];
+            $whr[] = ["ti.enterprise_id", "=", $this->user["uid"]];
+            $whr[] = ["e.type", "=", $this->user["type"]];
+            $whr[] = ["ti.id", "not in", $ids];
+            $list = \app\enterprise\model\Talent::alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")->field("ti.id,ti.name,ti.card_number as idCard")->where($whr)->select()->toArray();
+            foreach ($list as $info) {
+                if (strtotime($year . "-12-31") >= strtotime($info["identifyMonth"])) {
+                    $res[] = $info;
+                } else {
+                    $whereTypeChange = [];
+                    $whereTypeChange[] = ["talentId", "=", $info["id"]];
+                    $whereTypeChange[] = ["checkState", "=", MainState::PASS];
+                    $whereTypeChange[] = ["isPublic", "=", 6];
+                    $typeChanges = TalentTypeChange::where($whereTypeChange)->select()->toArray();
+                    foreach ($typeChanges as $typeChange) {
+                        if (strtotime($year . "-12-31") >= strtotime($typeChange["oldIdentifyMonth"])) {
+                            $res[] = $info;
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+        return new Response(Response::SUCCESS, "", ["rows" => $res, "total" => count($res)]);
+    }
+
 }

+ 11 - 0
app/enterprise/view/talent_allowance/apply.html

@@ -267,6 +267,17 @@
                                     </form>
                                 </div>
                             </div>
+                            <div class="panel panel-default">
+                                <div class="panel-heading" onclick="$(this).next().toggle()">
+                                    <h3 class="panel-title">
+                                        通用附件
+                                    </h3>
+                                </div>
+                                <div class="panel-body">
+                                    <table id="commonFileTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;">
+                                    </table>
+                                </div>
+                            </div>
                         </div>
                     </div>
                 </div>

+ 11 - 0
app/enterprise/view/talent_allowance/detail.html

@@ -251,6 +251,17 @@
                                     <label style="padding-top: 15px;color: red">声明:本人对输入材料的真实性负全部责任</label>
                                 </div>
                             </div>
+                            <div class="panel panel-default">
+                                <div class="panel-heading" onclick="$(this).next().toggle()">
+                                    <h3 class="panel-title">
+                                        通用附件
+                                    </h3>
+                                </div>
+                                <div class="panel-body">
+                                    <table id="commonFileTable" class="table-condensed" style="font-size: 10px;table-layout: fixed!important;">
+                                    </table>
+                                </div>
+                            </div>
                         </div>
                     </div>
                 </div>

+ 24 - 3
app/enterprise/view/talent_allowance/indexIC.html

@@ -17,7 +17,7 @@
                 <div class="row row-lg">
                     <div class="col-sm-12">
                         <div class="row">
-                            <input type="text" class="form-control" id="type" value="{$type}">
+                            <input type="hidden" class="form-control" id="type" value="{$type}">
                             <div class="col-sm-3">
                                 <div class="input-group input-group-sm">
                                     <div class="input-group-btn">
@@ -97,7 +97,7 @@
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.openTalentAllowanceInfoSelect()">
                                 <i class="fa fa-book"></i>&nbsp;查看
                             </button>
-                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.openTalentAllowanceInfoSelect()">
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.openBatchApplyModal()">
                                 <i class="fa fa-plus"></i>&nbsp;批量申请津补贴
                             </button>
                             <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.showCheckFileModal()">
@@ -120,7 +120,28 @@
         </div>
     </div>
 </div>
-
+<!--批量申请津补贴-->
+<div class="modal fade " id="batchApplyModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
+    <div class="modal-dialog modal-lg" role="document" style="min-width: 1200px;">
+        <div class="modal-content animated flipInY">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                <h4 class="modal-title" id="batchApplyModalLable">批量申请津补贴</h4>
+            </div>
+            <div class="modal-body">
+                <div class="toolbar" style="padding-bottom: 5px;">
+                    <button id="checkAllBatch" type="button" class="btn btn-secondary btn-sm btn-success">全选</button>
+                    <button id="uncheckAllBatch" type="button" class="btn btn-secondary btn-sm btn-danger">取消全选</button>
+                </div>
+                <table id="batchApplyTable" class="table-condensed table-sm" style="font-size: 12px;"></table>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-primary" id="batchApplyButton" onclick="TalentAllowanceInfo.batchApply()">批量申请</button>
+                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
+            </div>
+        </div>
+    </div>
+</div>
 <div class="modal fade " id="checkFileModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
     <div class="modal-dialog modal-lg" role="document" style="min-width: 1000px;">
         <div class="modal-content animated flipInY">

+ 301 - 0
app/job/TalentAllowance.php

@@ -0,0 +1,301 @@
+<?php
+
+namespace app\job;
+
+use think\queue\Job;
+use think\facade\Log;
+use think\facade\Db;
+use app\common\api\TalentState;
+use app\common\state\ProjectState;
+use app\common\model\TalentChecklog;
+use app\common\model\TalentAllowance as TaModel;
+use app\common\state\MainState;
+use app\common\api\LocationApi;
+use app\enterprise\model\TalentTypeChange;
+use app\common\state\AllowanceProjectEnum;
+
+/**
+ * Description of TalentAllowance
+ *
+ * @author sgq
+ */
+class TalentAllowance {
+
+    public function fire(Job $job, $data) {
+        if ($this->deal($data)) {
+            $job->delete();
+            return true;
+        }
+        if ($job->attempts() >= 3) {
+            $job->delete();
+            return false;
+        }
+        $job->release(10); //10秒后重试
+    }
+
+    /**
+     * 处理业务逻辑
+     * @param type $data
+     * @return bool
+     */
+    public function deal($data): bool {
+        switch ($data["type"]) {
+            case 1:
+                //添加保存未提交的津补贴申报
+                try {
+                    $talentId = $data["talentId"];
+                    $enterprise = $data["enterprise"];
+                    $year = $data["year"];
+                    $allowanceType = $data["allowanceType"];
+
+                    $ti = \app\common\api\VerifyApi::getTalentInfoById($talentId);
+                    if ($ti["checkState"] != TalentState::CERTIFICATED || $ti["enterprise_id"] != $enterprise["uid"] || !$year || !$allowanceType) {
+                        return false;
+                    }
+
+                    $where = [];
+                    $where[] = ["year", "=", $year];
+                    $where[] = ["idCard", "=", $ti["card_number"]];
+                    $where[] = ["checkState", "not in", [MainState::NOTPASS, MainState::PASS]];
+                    $exists = TaModel::where($where)->find();
+                    if ($exists) {
+                        return false;
+                    }
+
+                    $data = [
+                        "talentId" => $talentId,
+                        "enterpriseId" => $ti["enterprise_id"],
+                        "enterpriseName" => $enterprise["name"],
+                        "year" => $year,
+                        "source" => $ti["source"],
+                        "qzgccrcActiveTime" => $ti["certificateExpireTime"],
+                        "talentType" => $ti["enterpriseTag"],
+                        "address" => $ti["street"],
+                        "name" => $ti["name"],
+                        "sex" => $ti["sex"],
+                        "cardType" => $ti["card_type"],
+                        "idCard" => $ti["card_number"],
+                        "firstInJJTime" => $ti["fst_work_time"],
+                        "entryTime" => $ti["cur_entry_time"],
+                        "post" => $ti["position"],
+                        "phone" => $ti["phone"],
+                        "talentArrange" => $ti["talent_arrange"],
+                        "identifyCondition" => $ti["talent_condition"],
+                        "identifyGetTime" => $ti["identifyGetTime"],
+                        "identifyOutTime" => $ti["identifyExpireTime"],
+                        "identifyConditionName" => $ti["identifyConditionName"],
+                        "identifyMonth" => $ti["identifyMonth"],
+                        "bank" => $ti["bank"],
+                        "bankNetwork" => $ti["bank_branch_name"],
+                        "bankAccount" => $ti["bank_account"],
+                        "bankNumber" => $ti["bank_number"],
+                        "checkState" => 1,
+                        "type" => $enterprise["type"],
+                        "provinceCode" => $ti["province"],
+                        "provinceName" => LocationApi::getNameByCode($ti["province"]),
+                        "cityCode" => $ti["city"],
+                        "cityName" => LocationApi::getNameByCode($ti["city"]),
+                        "countyCode" => $ti["county"],
+                        "countyName" => LocationApi::getNameByCode($ti["county"]),
+                        "isSupple" => 2,
+                        "createTime" => date("Y-m-d H:i:s"),
+                        "createUser" => $enterprise["uid"],
+                        "id" => getStringId(),
+                        "allowanceType" => $allowanceType
+                    ];
+                    /*                     * 1.获取上一年度的人才层次 */
+                    $arrangeList = $this->getLastYearTalentType($data, $ti);
+                    if (!$arrangeList) {
+                        return false;
+                    }
+                    /*                     * 2.获取上一年度所在单位* */
+                    $contractDetailList = $this->getConcatList($ti, $data, $year); //保存上一年度的工作单位
+                    if (!$contractDetailList) {
+                        return false;
+                    }
+                    TaModel::insert($data);
+                    \app\common\model\TalentAllowancecontractDetail::insertAll($contractDetailList);
+                    /**
+                     * 4.添加津补贴核查项目
+                     */
+                    //核查项目详情表
+                    $this->createAllowanceProject($data, $contractDetailList);
+                    \app\common\model\TalentAllowanceArrange::insertAll($arrangeList);
+                    //添加日志
+                    TalentChecklog::create([
+                        'id' => getStringId(),
+                        'mainId' => $data['id'],
+                        'type' => intval(ProjectState::JBT),
+                        'typeFileId' => null,
+                        'active' => 1,
+                        'state' => 1,
+                        'step' => 0,
+                        'stateChange' => "保存未提交",
+                        'description' => "添加津补贴申报",
+                        'createTime' => date("Y-m-d H:i:s", time()),
+                        'createUser' => sprintf("%s(%s)", $enterprise["account"], $enterprise["companyName"])
+                    ]);
+                    return true;
+                } catch (\Exception $e) {
+                    Log::write($e->getMessage(), "error");
+                }
+                break;
+        }
+        return false;
+    }
+
+    /*     * 获取上一年度的人才层次变更信息 */
+
+    private function getLastYearTalentType($info, $talentInfo) {
+        $arrangeList = [];
+        /*         * * 添加人才层次记录 */
+        $where = [];
+        $where[] = ["talentId", "=", $info["talentId"]];
+        $where[] = ["checkState", "=", MainState::PASS];
+        $where[] = ["isPublic", ">=", 5];
+        $where[] = ["oldIdentifyMonth", "<=", $info["year"] . "-12-31"];
+        $typeList = TalentTypeChange::where($where)->field("oldTalentArrange,oldIdentifyCondition,oldIdentifyGetTime,oldIdentifyOutTime,oldIdentifyMonth,oldCertificateStartTime,oldCertificateOutTime,newIdentifyMonth")->order("createTime desc")->select()->toArray();
+        $typeList[] = [
+            "oldTalentArrange" => $talentInfo["talent_arrange"],
+            "oldIdentifyCondition" => $talentInfo["talent_condition"],
+            "oldIdentifyGetTime" => $talentInfo["identifyGetTime"],
+            "oldIdentifyOutTime" => $talentInfo["identifyExpireTime"],
+            "oldIdentifyMonth" => $talentInfo["identifyMonth"],
+            "oldCertificateStartTime" => $talentInfo["certificateGetTime"],
+            "oldCertificateOutTime" => $talentInfo["certificateExpireTime"],
+            "newIdentifyMonth" => $info["year"] . "-12-31"
+        ];
+        $totalMonth = \DateUtil::getMonthBetweenDates($info["year"] . "-01-01", $info["year"] . "-12-31");
+        /*         * 获取上一年度有效的人才层次 */
+        usort($typeList, function($a, $b) {
+            return (int) $b["oldTalentArrange"] - (int) $a["oldTalentArrange"];
+        });
+        $commonMonth = [];
+        foreach ($typeList as $talentTypeChange) {
+            $startTime = $talentTypeChange["oldIdentifyMonth"];
+            $endTime = $talentTypeChange["newIdentifyMonth"];
+            $monthList = \DateUtil::getMonthBetweenDatesNotBegin($startTime, $endTime);
+            if ($monthList) {
+                $monthList = array_intersect($monthList, $totalMonth);
+            }
+            if ($monthList) {
+                $months = implode(",", $monthList);
+                $monthList = array_filter($monthList, function($value) use ($commonMonth) {
+                    return !in_array($value, $commonMonth);
+                });
+                $commonMonth = array_filter(array_merge($commonMonth, $monthList));
+                if (count($monthList) > 0) {
+                    $arrange = [
+                        "id" => getStringId(),
+                        "mainId" => $info["id"],
+                        "talentArrange" => $talentTypeChange["oldTalentArrange"],
+                        "identifyCondition" => $talentTypeChange["oldIdentifyCondition"],
+                        "startTime" => $startTime,
+                        "endTime" => $endTime,
+                        "prepareMonths" => null,
+                        "description" => "申报年度有效月份:" . $months,
+                        "identifyConditionName" => $talentTypeChange["oldIdentifyConditionName"],
+                        "identifyConditionGetTime" => $talentTypeChange["oldIdentifyGetTime"],
+                    ];
+                    $sb = '';
+                    foreach ($monthList as $month) {
+                        $sb .= substr($month, 5, 2) . ",";
+                    }
+                    $arrange["prepareMonths"] = rtrim($sb, ",");
+                    $arrangeList[] = $arrange;
+                }
+            }
+        }
+        return $arrangeList;
+    }
+
+    /**
+     * @param
+     * @returns void
+     * @author Liu
+     * @date 2020/4/26
+     * @description 获取上一年度所在单位
+     * */
+    private function getConcatList($talentInfo, $info, $year) {
+        $totalMonth = \DateUtil::getMonthBetweenDates($year . "-01-01", $year . "-12-31");
+        /** 添加申报人才上一年度工作单位记录 */
+        $where = [];
+        $where[] = ["talentId", "=", $talentInfo["id"]];
+        $where[] = ["checkState", "=", 3];
+        $quitList = \app\common\model\TalentQuit::where($where)->field("enterpriseId,enterpriseName,talentType,identifyGetTime,starttime,endtime,entryTime,quitTime,post")->select()->toArray();
+
+        /*         * * 将最新的人才数据转为工作变更记录(为了统一处理) */
+        if ($talentInfo["active"] == 1) {
+            $labor_contract_rangetime = explode(" - ", $talentInfo["labor_contract_rangetime"]);
+            $starttime = $labor_contract_rangetime[0];
+            $endtime = $labor_contract_rangetime[1];
+            $quitList[] = [
+                "enterpriseId" => $talentInfo["enterprise_id"],
+                "enterpriseName" => $talentInfo["enterpriseName"],
+                "talentType" => $talentInfo["enterpriseTag"],
+                "identifyGetTime" => $talentInfo["identifyGetTime"],
+                "starttime" => $starttime,
+                "endtime" => $endtime,
+                "entryTime" => $talentInfo["cur_entry_time"],
+                "quitTime" => null,
+                "post" => $talentInfo["position"]
+            ];
+        }
+        $list = [];
+        foreach ($quitList as $quit) {
+            $monthList = \DateUtil::getMonthBetweenDates($quit["entryTime"], \StrUtil::isEmpOrNull($quit["quitTime"]) ? $year . "-12-31" : $quit["quitTime"]);
+            $monthList = array_intersect($monthList, $totalMonth);
+            if ($monthList) {
+                $sb = '';
+                foreach ($monthList as $month) {
+                    $sb .= substr($month, 5, 2) . ",";
+                }
+                $list[] = [
+                    "id" => getStringId(),
+                    "mainId" => $info["id"],
+                    "enterpriseId" => $quit["enterpriseId"],
+                    "talentType" => $quit["talentType"],
+                    "startTime" => $quit["starttime"],
+                    "endTime" => $quit["endtime"],
+                    "entryTime" => $quit["entryTime"],
+                    "quitTime" => \StrUtil::isEmpOrNull($quit["quitTime"]) ? $year . "-12-31" : $quit["quitTime"],
+                    "letterTime" => $quit["letterTime"],
+                    "gygb" => $quit["gygb"],
+                    "identifyGetTime" => $quit["identifyGetTime"],
+                    "isQuit" => \StrUtil::isEmpOrNull($quit["quitTime"]) ? 2 : 1,
+                    "post" => $quit["post"],
+                    "months" => rtrim($sb, ",")
+                ];
+            }
+        }
+        return $list;
+    }
+
+    private function createAllowanceProject($info, $contractList) {
+        foreach ($contractList as $detail) {
+            $projects = [
+                //AllowanceProjectEnum::PROJECT_CONTRACT,
+                AllowanceProjectEnum::PROJECT_TAX,
+                AllowanceProjectEnum::PROJECT_WAGES,
+                AllowanceProjectEnum::PROJECT_ATTENDANCE,
+                AllowanceProjectEnum::PROJECT_SB_PENSION,
+                AllowanceProjectEnum::PROJECT_SB_UNEMPLOYMENT,
+                AllowanceProjectEnum::PROJECT_SB_MEDICA,
+                    //AllowanceProjectEnum::PROJECT_WORKDAY,
+            ];
+            $list = [];
+            foreach ($projects as $project) {
+                $list[] = [
+                    "mainId" => $info["id"],
+                    "baseId" => $detail["id"],
+                    "enterpriseId" => $detail["enterpriseId"],
+                    "project" => $project,
+                    "isLock" => 1,
+                    "createTime" => date("Y-m-d H:i:s")
+                ];
+            }
+            \app\common\model\TalentAllowanceProject::insertAll($list);
+        }
+    }
+
+}

+ 61 - 0
public/static/modular/gate/talentAllowance/common/talentAllowanceInfo_select.js

@@ -84,6 +84,67 @@ TalentAllowanceInfoDlg.initFileTable = function (){
             ajax.start();
         }
     });
+    TalentAllowanceInfoDlg.initCommonFileTable();
+
+}
+
+//初始化通用附件
+TalentAllowanceInfoDlg.initCommonFileTable = function () {
+    var queryData = {};
+    queryData.id = $("#id").val();
+    $("#commonFileTable").bootstrapTable({
+        url: Feng.ctxPath + "/common/api/listTalentAllowanceCommonFile",
+        method: 'POST',
+        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: false, // 设置为 true 会在表格底部显示分页条
+        paginationHAlign: "left",
+        paginationDetailHAlign: "right",
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        showColumns: false,
+        queryParams: function (params) {
+            return $.extend(queryData, params)
+        },
+        rowStyle: function (row, index) {
+            return {css: {"word-break": "break-word", "white-space": "inherit"}}
+        },
+        columns: [
+            {title: '附件原名', field: 'originalName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip',  width: '70%', formatter: function (value, row, index) {
+                    return value;
+                }},
+            {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle',width: "20%",
+                formatter: function (value, row, index) {
+                    var sn = value.lastIndexOf(".");
+                    var suffix = value.substring(sn + 1, value.length);
+                    var imgStr = "";
+                    if (suffix == "pdf" || suffix == "PDF") {
+                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
+                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
+                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
+                    } else {
+                        imgStr = '<img class=\"cImgUrl\"  src=\"' + value + '\" style=\"width:25px;height:25px;\">';
+                    }
+                    return imgStr;
+                }
+            },
+            {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle', width: '10%',
+                formatter: function (value, row, index) {
+                    return "";
+                }
+            }
+        ],
+        onPostBody: function () {
+            $("td.uitd_showTip").bind("mouseover", function () {
+                var htm = $(this).html();
+                $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+            });
+            $(".cImgUrl").viewer({fullscreen: false});
+        }
+    });
 
 }
 

+ 63 - 0
public/static/modular/gate/talentAllowance/common/talentAllowance_info.js

@@ -591,6 +591,69 @@ TalentAllowanceInfoDlg.initFileTable = function () {
         }
     });
 
+    TalentAllowanceInfoDlg.initCommonFileTable();
+
+}
+
+
+//初始化通用附件
+TalentAllowanceInfoDlg.initCommonFileTable = function () {
+    var queryData = {};
+    queryData.id = $("#id").val();
+    $("#commonFileTable").bootstrapTable({
+        url: Feng.ctxPath + "/common/api/listTalentAllowanceCommonFile",
+        method: 'POST',
+        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: false, // 设置为 true 会在表格底部显示分页条
+        paginationHAlign: "left",
+        paginationDetailHAlign: "right",
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        showColumns: false,
+        queryParams: function (params) {
+            return $.extend(queryData, params)
+        },
+        rowStyle: function (row, index) {
+            return {css: {"word-break": "break-word", "white-space": "inherit"}}
+        },
+        columns: [
+            {title: '附件原名', field: 'originalName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip',  width: '70%', formatter: function (value, row, index) {
+                    return value;
+                }},
+            {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle',width: "20%",
+                formatter: function (value, row, index) {
+                    var sn = value.lastIndexOf(".");
+                    var suffix = value.substring(sn + 1, value.length);
+                    var imgStr = "";
+                    if (suffix == "pdf" || suffix == "PDF") {
+                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
+                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
+                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
+                    } else {
+                        imgStr = '<img class=\"cImgUrl\"  src=\"' + value + '\" style=\"width:25px;height:25px;\">';
+                    }
+                    return imgStr;
+                }
+            },
+            {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle', width: '10%',
+                formatter: function (value, row, index) {
+                    return "";
+                }
+            }
+        ],
+        onPostBody: function () {
+            $("td.uitd_showTip").bind("mouseover", function () {
+                var htm = $(this).html();
+                $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+            });
+            $(".cImgUrl").viewer({fullscreen: false});
+        }
+    });
+
 }
 
 //校验是否保存基础信息

+ 110 - 2
public/static/modular/gate/talentAllowance/ic/talentAllowanceInfoIC.js

@@ -310,7 +310,7 @@ TalentAllowanceInfo.initCheckFileTable = function () {
         sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
         showColumns: false,
         queryParams: function (params) {
-            return {"batch": $("#batch").val(), "fileTag": "master_living_allowance"};
+            return {"batch": $("#batch").val()};
         },
         rowStyle: function (row, index) {
             return {css: {"word-break": "break-word", "white-space": "inherit"}}
@@ -352,6 +352,114 @@ TalentAllowanceInfo.initCheckFileTable = function () {
     });
 }
 
+TalentAllowanceInfo.commonColumns = function () {
+    return [
+        {field: "selectItem", checkbox: true},
+        {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle', width: "30%"},
+        {title: '证件号码', field: 'idCard', visible: true, align: 'center', valign: 'middle', width: "70%"}
+    ];
+}
+
+TalentAllowanceInfo.openBatchApplyModal = function (type) {
+    var columns = TalentAllowanceInfo.commonColumns();
+    $('#batchApplyTable').bootstrapTable('destroy');
+    $('#batchApplyTable').bootstrapTable({
+        url: Feng.ctxPath + "/enterprise/talentAllowance/findTalentAllowance",
+        method: 'POST',
+        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+        search: true, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: false, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: true, // 设置为 true 会在表格底部显示分页条
+        paginationHAlign: "left",
+        paginationDetailHAlign: "right",
+        sidePagination: "client", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        pageNumber: 1, //初始化加载第一页,默认第一页
+        pageSize: 10, //每页的记录行数(*)
+        pageList: [10, 25, 50, 100, 500, 1000, 1500], //可供选择的每页的行数(*)
+        maintainSelected: true, //全表全选需要开启
+        showColumns: false,
+        responseHandler: function (res) {
+            $(".time").each(function () {
+                laydate.render({
+                    elem: "#" + $(this).attr("id")
+                    , type: 'date'
+                    , format: 'yyyy年MM月dd日'
+                });
+            });
+            $("#batchApplyModal").modal("show");
+            return res.obj.rows;
+        },
+        columns: columns
+    });
+}
+
+TalentAllowanceInfo.batchApply = function () {
+    var selected = $('#batchApplyTable').bootstrapTable('getSelections');
+    if (!selected || selected.length < 1) {
+        Feng.info("请至少选择一行数据!");
+        return;
+    }
+    var ids = "";
+    var count = 0;
+    for (var i = 0; i < selected.length; i++) {
+        count++;
+        ids = ids + selected[i].id + ",";
+    }
+    var operation = function () {
+        var index = layer.open({
+            type: 1,
+            title: '请确认补贴类型',
+            area: ['300px', '220px'], //宽高
+            fix: false, //不固定
+            maxmin: true,
+            content: '<div class="rowGroup" style="padding:20px;"><label class="control-label spacing"><span style="color: red">*</span>补贴类型</label><br><input type="radio" name="batchAllowanceType" value="1"/><label for="batchAllowanceType">工作津贴</label>&nbsp;&nbsp;<input type="radio" name="batchAllowanceType" value="2"/><label for="batchAllowanceType">一次性交通补贴</label></div>',
+            btn: ['<i class="fa fa-save layui-bg-green"></i>&nbsp;&nbsp;确定', '<i class="fa fa-eraser"></i>&nbsp;&nbsp;关闭'],
+            btnAlign: 'c',
+            success: function () {
+
+            },
+            yes: function (index, layero) {
+                var allowanceType = $("input[name=batchAllowanceType]:checked").val();
+                if (Feng.isEmptyStr(allowanceType) || typeof allowanceType == "undefined") {
+                    Feng.info("请选择补贴类型");
+                    return;
+                }
+                layer.close(index);
+                var allowanceTypeStr = allowanceType == 1 ? "工作津贴" : "一次性交通补贴";
+                Feng.confirm("已选<span style='color:#ff0000;'>" + count + "</span>人,确定要批量申请<span style='color:#ff0000;'>" + allowanceTypeStr + "</span>吗?<br><span style='color:#ff0000;'>*此方法不能撤销,请谨慎操作</span>", function () {
+                    var ajax = new $ax("/enterprise/talentAllowance/batchApply", function (data) {
+                        if (data.code == 200) {
+                            Feng.success(data.msg);
+                            TalentInfo.table.refresh();
+                            $("#batchApplyModal").modal("hide");
+                        } else {
+                            Feng.error(data.msg);
+                        }
+                    }, function (data) {
+                        Feng.error("公示失败!" + data.responseJSON.message + "!");
+                    });
+                    ajax.set("ids", ids);
+                    ajax.set("allowanceType", allowanceType);
+                    ajax.start();
+                });
+            }
+        });
+    }
+    Feng.confirm("确定进入下一步选择补贴类型吗?", operation);
+}
+
+
+$('#checkAllBatch').click(function () {
+    $("#batchApplyTable").bootstrapTable('togglePagination').bootstrapTable('checkAll').bootstrapTable('togglePagination');
+})
+$('#uncheckAllBatch').click(function () {
+    $("#batchApplyTable").bootstrapTable('togglePagination').bootstrapTable('uncheckAll').bootstrapTable('togglePagination')
+})
+
+
 /**
  * 核查材料留存上传
  */
@@ -402,7 +510,7 @@ TalentAllowanceInfo.checkFileUpload = function () {
 TalentAllowanceInfo.deleteCheckFile = function (id, type) {
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/enterprise/talentAllowance/deleteCommonFile", function (data) {
-            if (data.code = 200) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 $("#checkFileTable").bootstrapTable("refresh", {});
             } else {

+ 1 - 1
public/static/modular/master/livingAllowanceInfo/livingAllowanceInfo.js

@@ -875,7 +875,7 @@ LivingAllowanceInfo.checkFileUpload = function () {
 LivingAllowanceInfo.deleteCheckFile = function (id, type) {
     var operation = function () {
         var ajax = new $ax(Feng.ctxPath + "/common/api/deleteNonPredefinedFile", function (data) {
-            if (data.code = 200) {
+            if (data.code == 200) {
                 Feng.success(data.msg);
                 $("#checkFileTable").bootstrapTable("refresh", {});
             } else {

+ 1 - 0
public/static/modular/talentAllowance/talentAllowanceInfo_info.js

@@ -842,6 +842,7 @@ $(function () {
                 $(this).val($(this).attr("value"));
     });
     TalentAllowanceInfoDlg.initFileTable();
+    TalentAllowanceInfoDlg.initCommonFileTable();
     TalentAllowanceInfoDlg.initContract();
     TalentAllowanceInfoDlg.showAllLog();
     //批量加载时间控件

+ 61 - 0
public/static/modular/talentAllowance/talentAllowanceInfo_info_supple.js

@@ -384,6 +384,67 @@ TalentAllowanceInfoDlg.initFileTable = function () {
     });
 }
 
+
+//初始化通用附件
+TalentAllowanceInfoDlg.initCommonFileTable = function () {
+    var queryData = {};
+    queryData.id = $("#id").val();
+    $("#commonFileTable").bootstrapTable({
+        url: Feng.ctxPath + "/common/api/listTalentAllowanceCommonFile",
+        method: 'POST',
+        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: false, // 设置为 true 会在表格底部显示分页条
+        paginationHAlign: "left",
+        paginationDetailHAlign: "right",
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        showColumns: false,
+        queryParams: function (params) {
+            return $.extend(queryData, params)
+        },
+        rowStyle: function (row, index) {
+            return {css: {"word-break": "break-word", "white-space": "inherit"}}
+        },
+        columns: [
+            {title: '附件原名', field: 'originalName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip',  width: '70%', formatter: function (value, row, index) {
+                    return value;
+                }},
+            {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle',width: "20%",
+                formatter: function (value, row, index) {
+                    var sn = value.lastIndexOf(".");
+                    var suffix = value.substring(sn + 1, value.length);
+                    var imgStr = "";
+                    if (suffix == "pdf" || suffix == "PDF") {
+                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
+                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
+                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
+                    } else {
+                        imgStr = '<img class=\"cImgUrl\"  src=\"' + value + '\" style=\"width:25px;height:25px;\">';
+                    }
+                    return imgStr;
+                }
+            },
+            {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle', width: '10%',
+                formatter: function (value, row, index) {
+                    return "";
+                }
+            }
+        ],
+        onPostBody: function () {
+            $("td.uitd_showTip").bind("mouseover", function () {
+                var htm = $(this).html();
+                $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+            });
+            $(".cImgUrl").viewer({fullscreen: false});
+        }
+    });
+
+}
+
 /**
  * 
  */

+ 62 - 0
public/static/modular/talentAllowance/talentAllowanceInfo_public_check.js

@@ -1010,6 +1010,67 @@ TalentAllowanceInfoDlg.initFileTable = function (){
     });
 }
 
+
+//初始化通用附件
+TalentAllowanceInfoDlg.initCommonFileTable = function () {
+    var queryData = {};
+    queryData.id = $("#id").val();
+    $("#commonFileTable").bootstrapTable({
+        url: Feng.ctxPath + "/common/api/listTalentAllowanceCommonFile",
+        method: 'POST',
+        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: false, // 设置为 true 会在表格底部显示分页条
+        paginationHAlign: "left",
+        paginationDetailHAlign: "right",
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        showColumns: false,
+        queryParams: function (params) {
+            return $.extend(queryData, params)
+        },
+        rowStyle: function (row, index) {
+            return {css: {"word-break": "break-word", "white-space": "inherit"}}
+        },
+        columns: [
+            {title: '附件原名', field: 'originalName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip',  width: '70%', formatter: function (value, row, index) {
+                    return value;
+                }},
+            {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle',width: "20%",
+                formatter: function (value, row, index) {
+                    var sn = value.lastIndexOf(".");
+                    var suffix = value.substring(sn + 1, value.length);
+                    var imgStr = "";
+                    if (suffix == "pdf" || suffix == "PDF") {
+                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
+                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
+                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
+                    } else {
+                        imgStr = '<img class=\"cImgUrl\"  src=\"' + value + '\" style=\"width:25px;height:25px;\">';
+                    }
+                    return imgStr;
+                }
+            },
+            {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle', width: '10%',
+                formatter: function (value, row, index) {
+                    return "";
+                }
+            }
+        ],
+        onPostBody: function () {
+            $("td.uitd_showTip").bind("mouseover", function () {
+                var htm = $(this).html();
+                $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+            });
+            $(".cImgUrl").viewer({fullscreen: false});
+        }
+    });
+
+}
+
 TalentAllowanceInfoDlg.showAllLog = function(){
     var id = $("#id").val();
     if(Feng.isNotEmptyStr(id)){
@@ -1027,6 +1088,7 @@ $(function(){
     });
     TalentAllowanceInfoDlg.initFileTable();
     TalentAllowanceInfoDlg.initContract();
+    TalentAllowanceInfoDlg.initCommonFileTable();
     //批量加载时间控件
     $(".date").each(function(){
         laydate.render({elem: "#"+$(this).attr("id"),type: 'date',trigger: 'click'});

+ 61 - 0
public/static/modular/talentAllowance/talentAllowanceInfo_select.js

@@ -356,6 +356,67 @@ TalentAllowanceInfoDlg.initFileTable = function (){
             ajax.start();
         }
     });
+    TalentAllowanceInfoDlg.initCommonFileTable();
+}
+
+//初始化通用附件
+TalentAllowanceInfoDlg.initCommonFileTable = function () {
+    var queryData = {};
+    queryData.id = $("#id").val();
+    $("#commonFileTable").bootstrapTable({
+        url: Feng.ctxPath + "/common/api/listTalentAllowanceCommonFile",
+        method: 'POST',
+        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+        search: false, // 是否显示表格搜索,此搜索是客户端搜索,不会进服务端
+        showRefresh: false, // 是否显示刷新按钮
+        clickToSelect: true, // 是否启用点击选中行
+        singleSelect: true, // 设置True 将禁止多选
+        striped: true, // 是否显示行间隔色
+        pagination: false, // 设置为 true 会在表格底部显示分页条
+        paginationHAlign: "left",
+        paginationDetailHAlign: "right",
+        sidePagination: "server", // 设置在哪里进行分页,可选值为 'client' 或者 'server'
+        showColumns: false,
+        queryParams: function (params) {
+            return $.extend(queryData, params)
+        },
+        rowStyle: function (row, index) {
+            return {css: {"word-break": "break-word", "white-space": "inherit"}}
+        },
+        columns: [
+            {title: '附件原名', field: 'originalName', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip',  width: '70%', formatter: function (value, row, index) {
+                    return value;
+                }},
+            {title: '预览', field: 'url', visible: true, align: 'center', valign: 'middle',width: "20%",
+                formatter: function (value, row, index) {
+                    var sn = value.lastIndexOf(".");
+                    var suffix = value.substring(sn + 1, value.length);
+                    var imgStr = "";
+                    if (suffix == "pdf" || suffix == "PDF") {
+                        imgStr = "<button type='button'  onclick=\"Feng.showPdf('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></button>";
+                    } else if (suffix == "xlsx" || suffix == "XLSX" || suffix == 'xls' || suffix == 'XLS') {
+                        imgStr = "<button type='button'  onclick=\"Feng.showExcel('" + value + "','" + row.id + "','" + row.originalName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
+                    } else {
+                        imgStr = '<img class=\"cImgUrl\"  src=\"' + value + '\" style=\"width:25px;height:25px;\">';
+                    }
+                    return imgStr;
+                }
+            },
+            {title: '操作', field: 'url', visible: true, align: 'center', valign: 'middle', width: '10%',
+                formatter: function (value, row, index) {
+                    return "";
+                }
+            }
+        ],
+        onPostBody: function () {
+            $("td.uitd_showTip").bind("mouseover", function () {
+                var htm = $(this).html();
+                $(this).webuiPopover({title: '详情', content: htm, trigger: 'hover'}).webuiPopover('show');
+            });
+            $(".cImgUrl").viewer({fullscreen: false});
+        }
+    });
+
 }
 
 TalentAllowanceInfoDlg.showAllLog = function(){