ZYjames 5 dní pred
rodič
commit
a93747a603

+ 2 - 2
tpl/SJPSDB/SJPSDB/js/formeditFL.js

@@ -485,7 +485,7 @@ app.controller("formeditCtrl", ["$scope", "$http", "$timeout", "$interval", "$sc
             var res = strToJson(s4.decryptData_CBC(obj.data));
             self.data = {
 							
-								CPSX:res.data.SX_SJPSDU.CPSX == "" ? sp.format(sp.getLocalDate()) : sp.format(res.data.SX_SJPSDU.CPSX),
+								CPSX:res.data.SX_SJPSDU.CPSX == "" ? sp.dateCount(-1) : sp.format(res.data.SX_SJPSDU.CPSX),
                 ID: res.data.SX_SJPSDU.ID,
                 APPCODE: res.data.SX_SJPSDU.APPCODE,
                 TITLE: res.data.SX_SJPSDU.TITLE == "" ? sp.getUrlName("TITLE") != "" ? decodeURIComponent(sp.getUrlName("TITLE")) : "" : res.data.SX_SJPSDU.TITLE,
@@ -1721,7 +1721,7 @@ app.controller("formeditCtrl", ["$scope", "$http", "$timeout", "$interval", "$sc
     //发生修改
     self.changeFiled = function (str) {
         self.filedChange = true;
-        if (str = "XBCS") {
+        if (str == "XBCS") {
             self.XBCSROWS = Math.ceil(self.data.XBCS.length / 13) < 1 ? 1 : Math.ceil(self.data.XBCS.length / 13)
         }
 				

+ 12 - 3
tpl/gongzi/js/list.js

@@ -48,7 +48,7 @@ app.controller("listCtrl", ["$scope", "$http", "$timeout", function ($scope, $ht
                 if (item.code != "ID" && item.code != "ROUTEINFOID" &&
                     item.code != "SORTID" && item.code != "APPCODE" &&
                     item.code != "CTIME" && item.code != "RYSF" && item.code != "RYFL" && item.code != "SFZHM" && item.code != "CJGZSJ" && item.code != "ZW") {
-                    self.thead.push({ code: item.code, cname: item.cname, ckind: item.ckind, show: true })
+                    self.thead.push({ code: item.code, cname: item.cname, ckind: item.ckind, show: false })
                 }
             })
             self.date = sp.currentYear() + "-" + formate(sp.currentMonth())
@@ -96,11 +96,17 @@ app.controller("listCtrl", ["$scope", "$http", "$timeout", function ($scope, $ht
                     });
                     self.list.forEach(function (item) {
                         self.thead.forEach(function (item1) {
+                            if (item[item1.code] != "" && item[item1.code] != null && item[item1.code] != undefined) {
+                                item1.show = true;
+                            }
                             if (item1.ckind == "datetime") {
                                 item[item1.code] = item[item1.code] ? sp.minsToDate("yyyy-MM", item[item1.code]) : "";
                             }
                             if (item.NAMETYPE == "合计") {
                                 item.XM = "合计";
+                                //if (item[item1.code] == "" || item[item1.code] == null || item[item1.code] == undefined) {
+                                //    item1.show = false;
+                                //}
                             }
                         })
                     })
@@ -130,9 +136,12 @@ app.controller("listCtrl", ["$scope", "$http", "$timeout", function ($scope, $ht
                             if (item1.ckind == "datetime") {
                                 item[item1.code] = sp.format(item[item1.code]).slice(0, 10)
                             }
-                            if ((item1.ckind == "decimal" && item[item1.code] == 0) || item[item1.code] == "" || item[item1.code] == null | item[item1.code] == undefined) {
-                                item1.show = false;
+                            if (item[item1.code] != 0 && item[item1.code] != "" && item[item1.code] != null && item[item1.code] != undefined) {
+                                item1.show = true;
                             }
+                            //if ((item1.ckind == "decimal" && item[item1.code] == 0) || item[item1.code] == "" || item[item1.code] == null | item[item1.code] == undefined) {
+                            //    item1.show = false;
+                            //}
                         })
                     })
                 }

+ 1 - 1
tpl/gongzi/list.html

@@ -48,7 +48,7 @@
                                                     </tr>
                                                 </thead>
                                                 <tbody>
-                                                    <tr ng-repeat="item in ctl.list">
+                                                    <tr ng-repeat="item in ctl.list" ng-hide="item.NAMETYPE=='合计'">
                                                         <td ng-bind="$index+1"></td>
                                                         <td ng-repeat="item1 in ctl.thead" ng-if="item1.show"><span title="{{item[item1.code]}}" ng-bind="item[item1.code]"></span></td>
                                                     </tr>

+ 12 - 0
tpl/shixiangdb/SXDBD/js/formeditFL.js

@@ -506,6 +506,7 @@ app.controller("formeditCtrl", ["$scope", "$http", "$timeout", "$interval", "$sc
             self.data = {
                 ID: res.data.DCDB_SXDBD.ID,
                 APPCODE: res.data.DCDB_SXDBD.APPCODE,
+                CPSX: res.data.DCDB_SXDBD.CPSX == "" ? "" : sp.format(res.data.DCDB_SXDBD.CPSX),
                 BH: res.data.DCDB_SXDBD.BH == "" ? self.BH : res.data.DCDB_SXDBD.BH,
                 DBSX1: res.data.DCDB_SXDBD.DBSX1,
                 PSLD: res.data.DCDB_SXDBD.PSLD || '',
@@ -529,6 +530,17 @@ app.controller("formeditCtrl", ["$scope", "$http", "$timeout", "$interval", "$sc
                 FGLDSFTYBJ: res.data.DCDB_SXDBD.FGLDSFTYBJ == "" ? "" : res.data.DCDB_SXDBD.FGLDSFTYBJ,
                 SQRUSERID: res.data.DCDB_SXDBD.SQRUSERID == "" ? self.userId : res.data.DCDB_SXDBD.SQRUSERID,
             }
+            if (!Boolean(self.data.ZZYQWCQX) && (res.data.DCDB_SXDBD.WCSX == "" || res.data.DCDB_SXDBD.WCSX == null)) {
+                let objDate = new Date()
+                let wcsx_Date = new Date(self.data.WCSX)
+                let dif_t = wcsx_Date.getTime() - objDate.getTime();
+                let Day_dif_t = dif_t / (1000 * 60 * 60 * 24)
+                if (Day_dif_t > 10) {
+                    self.data.CPSX = sp.getNextDate(self.data.WCSX, -2);
+                } else {
+                    self.data.CPSX = sp.getNextDate(self.data.WCSX, -1);
+                }
+            }
             self.readonly = {
 							CPSX: res.data.DCDB_SXDBD["CPSX.EREADONLY"] == "true",
                 BH: res.data.DCDB_SXDBD["BH.EREADONLY"] == "true",