Explorar o código

津补贴审核端项目表现形式提升

sugangqiang hai 1 ano
pai
achega
9914b67473

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

@@ -265,12 +265,15 @@ TalentAllowanceInfoDlg.initProjectColumns = function () {
                 var tmp = [];
                 if (row.project == 4 && allowanceType == 2) {
                     var dayArr = value ? value.split(",") : [];
+                    var totalDays = 0;
                     for (var d = 0; d < dayArr.length; d++) {
                         var kv = dayArr[d].split("=");
                         if (kv[0] && kv[1]) {
+                            totalDays += parseInt(kv[1]);
                             tmp.push(kv[0] + "月(" + kv[1] + "天)");
                         }
                     }
+                    tmp.push("共计" + totalDays + "天");
                 } else {
                     var monthArr = value ? value.split(",") : [];
                     for (var d = 0; d < monthArr.length; d++) {

+ 25 - 28
public/static/modular/talentAllowance/talentAllowanceInfo_info_supple.js

@@ -88,33 +88,30 @@ TalentAllowanceInfoDlg.initProjectColumns = function (enterpriseId) {
     return [
         {field: 'selectItem', checkbox: false, visible: false},
         {title: '核查项目名称', field: 'projectName', visible: true, align: 'center', valign: 'middle', width: "15%", 'class': 'uitd_showTip'},
-        {title: '详情', field: 'months', visible: true, align: 'center', valign: 'middle', width: "35%",
+        {title: '详情', field: 'months', visible: true, align: 'center', valign: 'middle', width: "40%", 'class': 'uitd_showTip',
             formatter: function (value, row, index) {
-                if (value != null && value != '') {
-                    return value;
-                } else if (row.days != null && row.days != '') {
-                    return row.days + "天";
-                } else {
-                    return "";
-                }
-            }
-        },
-        {title: '附件材料', field: 'fileUrl', visible: true, align: 'center', valign: 'middle', width: "35%",
-            formatter: function (value, row, index) {
-                if (Feng.isNotEmptyStr(value)) {
-                    var sn = value.lastIndexOf(".");
-                    var suffix = value.substring(sn + 1, value.length);
-                    var imgStr = "";
-                    if (suffix == "pdf" || suffix == "PDF") {
-                        return  "<button type='button'  onclick=\"Feng.showPdf('" + value + "','" + row.id + "','" + row.projectName + "')\" 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') {
-                        return "<button type='button'  onclick=\"Feng.showExcel('" + value + "','" + row.id + "','" + row.projectName + "')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></button>";
-                    } else {
-                        return '<img class=\"imgs\"  src=\"' + value + '\" style=\"width:25px;height:25px;\">';
+                var allowanceType = $("#allowanceType").val();
+                var tmp = [];
+                if (row.project == 4 && allowanceType == 2) {
+                    var dayArr = value ? value.split(",") : [];
+                    var totalDays = 0;
+                    for (var d = 0; d < dayArr.length; d++) {
+                        var kv = dayArr[d].split("=");
+                        if (kv[0] && kv[1]) {
+                            totalDays += parseInt(kv[1]);
+                            tmp.push(kv[0] + "月(" + kv[1] + "天)");
+                        }
                     }
+                    tmp.push("共计" + totalDays + "天");
                 } else {
-                    return "忽略";
+                    var monthArr = value ? value.split(",") : [];
+                    for (var d = 0; d < monthArr.length; d++) {
+                        if (monthArr[d]) {
+                            tmp.push(monthArr[d] + "月");
+                        }
+                    }
                 }
+                return tmp.join(",");
             }
         },
         {title: '备注', field: 'description', visible: true, align: 'center', valign: 'middle', width: "25%", 'class': 'uitd_showTip'},
@@ -141,9 +138,9 @@ TalentAllowanceInfoDlg.initProjectColumns = function (enterpriseId) {
                             "<i class=\"fa fa-edit\"></i>修改" +
                             "</button>";
                 }
-                if (value == 1 || value == 2) {
-                    html = html + "<button type='button' onclick=\"TalentAllowanceInfoDlg.showFileTable('" + row.project + "')\"  style='margin-left: 5px;' class=\"btn btn-xs btn-default\"><i class=\"fa fa-book\"></i>查看附件</button>";
-                }
+                /*if (value == 1 || value == 2) {
+                 html = html + "<button type='button' onclick=\"TalentAllowanceInfoDlg.showFileTable('" + row.project + "')\"  style='margin-left: 5px;' class=\"btn btn-xs btn-default\"><i class=\"fa fa-book\"></i>查看附件</button>";
+                 }*/
                 if (Feng.isNotEmptyStr(row.fileUrl)) {
                     html = html + "<button type='button' onclick=\"TalentAllowanceInfoDlg.downloadFileByUrl('" + row.fileUrl + "')\" style='margin-left: 5px;' class=\"btn btn-xs btn-success\"><i class=\"fa fa-download\"></i>下载</button>";
                 }
@@ -411,10 +408,10 @@ TalentAllowanceInfoDlg.initCommonFileTable = function () {
             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) {
+            {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%",
+            {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);