Explorar o código

津补贴审核增加下载文件

sugangqiang hai 11 meses
pai
achega
0948647676

+ 5 - 0
app/admin/view/talent_allowance/index.html

@@ -333,6 +333,11 @@
                                 <i class="fa fa-eye"></i>&nbsp;查看
                             </button>
                             {/if}
+                            {if condition="chkCommission('','/admin/talentAllowance/firstDownload')"}
+                            <button type="button" class="btn btn-sm btn-primary " onclick="TalentAllowanceInfo.download()" id="">
+                                <i class="fa fa-download"></i>&nbsp;下载
+                            </button>
+                            {/if}
                             {/eq}
                             {eq name="process" value="2"}
                             {if condition="chkCommission('/admin/talentAllowance/visitCheck','/talentAllowance/visitCheck')"}

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

@@ -779,6 +779,12 @@ class Api extends BaseController {
                 $enterprise_info = \app\common\model\Enterprise::findOrEmpty($talent_info["enterprise_id"]);
                 $zip_filename = sprintf("%s(%s)人才申报材料.zip", $talent_info["name"], $enterprise_info["name"]);
                 break;
+            case ProjectState::JBT:
+                $where[] = ["type", "=", $type];
+                $info = \app\common\model\TalentAllowance::findOrEmpty($id);
+                $enterprise_info = \app\common\model\Enterprise::findOrEmpty($info["enterpriseId"]);
+                $zip_filename = sprintf("%s(%s)津补贴申报材料.zip", $info["talentName"], $enterprise_info["name"]);
+                break;
             case ProjectState::QUIT:
                 $table = "new_talent_common_file";
                 $info = \app\common\model\TalentQuit::findOrEmpty($id);

+ 8 - 0
public/static/modular/talentAllowance/talentAllowanceInfo.js

@@ -839,6 +839,14 @@ TalentAllowanceInfo.getIdentifyCondition = function () {
     });
     $("#identifyCondition").trigger('chosen:updated');
 }
+/**
+ * 下载附件
+ */
+TalentAllowanceInfo.download = function () {
+    if (this.check()) {
+        window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=2&id=" + TalentAllowanceInfo.seItem.id));
+    }
+}
 
 
 $(function () {