Browse Source

货车中发货将发货提醒对应的单据设置成已读

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@10536 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
wangmh 8 years ago
parent
commit
fcc43b23f7

+ 13 - 0
src/main/webapp/resources/js/index/app.js

@@ -1531,6 +1531,19 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                     toaster.pop('error', '错误', response.data);
                 });
             }
+
+            $scope.setCheckedNoticeRead = function () {
+                var ids = [];
+                for (var i in $scope.notices) {
+                    var item = $scope.notices[i];
+                    if (item.id) {
+                        ids.push(item.id);
+                    }
+                }
+                PurcNotice.setRead({}, ids, function (message) {
+                    
+                });
+            }
         };
     }]);
     app.controller('PersonalSaleStatCtrl', ['$scope', 'SaleStat', function ($scope, SaleStat) {

+ 1 - 1
src/main/webapp/resources/tpl/index/sale/track.html

@@ -85,7 +85,7 @@
 				class="text-num text-bold" ng-bind="total | number:2"></span></li>
 		</ul>
 	</div>
-	<button class="btn btn-primary" ng-click="send(); lockClick()"
+	<button class="btn btn-primary" ng-click="send(); lockClick();setCheckedNoticeRead()"
 		ng-disabled="!notices||notices.length==0 || lockstatus" type="button">确认送货</button>
 	<button class="btn btn-default" ng-click="cancel()" type="button">取消</button>
 </div>