Quellcode durchsuchen

消息红点: 采购单增加批量设置已读的方式

hejq vor 7 Jahren
Ursprung
Commit
d9c644a973

+ 4 - 1
src/main/webapp/resources/js/index/app.js

@@ -2936,7 +2936,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
             //设置单据已读
             $scope.setOrdersRead = function (id) {
-                PurcOrders.setRead({}, sourceId, function () {
+                if (!$scope.unread.replied || $scope.unread.replied == 0) {
+                    return;
+                }
+                PurcOrders.setRead({}, function () {
                     getUnreadCount();
                 });
             };

+ 4 - 4
src/main/webapp/resources/tpl/index/purc/order.html

@@ -212,21 +212,21 @@
 					</div>
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
-							ng-class="{'btn-info':active=='done'}" ng-click="setActive('done')">已回复
+							ng-class="{'btn-info':active=='done'}" ng-click="setActive('done');setOrdersRead()">已回复
 							<b class="new-dot" ng-if="unread.replied > 0">{{unread.replied>99?'99+':unread.replied}}</b>
 						</button>
 					</div>
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
-							ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo')">待回复</button>
+							ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo');setOrdersRead()">待回复</button>
 					</div>
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
-							ng-class="{'btn-info':active=='waiting'}" ng-click="setActive('waiting')">待交货</button>
+							ng-class="{'btn-info':active=='waiting'}" ng-click="setActive('waiting');setOrdersRead()">待交货</button>
 					</div>
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
-							ng-class="{'btn-info':active=='end'}" ng-click="setActive('end')">已结案</button>
+							ng-class="{'btn-info':active=='end'}" ng-click="setActive('end');setOrdersRead()">已结案</button>
 					</div>
 				</div>
 			</div>