|
|
@@ -3068,7 +3068,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
$scope.onReplyClick = function (item, inverse) {
|
|
|
if (item.reply) {
|
|
|
- if (!item.reply.qty || item.reply.qty < 0 || item.reply.qty > item.qty) {
|
|
|
+ if (!item.reply.qty || item.reply.qty < 0 /*|| item.reply.qty > item.qty*/) {
|
|
|
toaster.pop('warning', '提示', '请填写有效的回复数量!');
|
|
|
return;
|
|
|
}
|
|
|
@@ -3207,6 +3207,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
var sum = 0;
|
|
|
angular.forEach($scope.order.orderItems, function (item) {
|
|
|
sum += item.qty * item.price;
|
|
|
+ //获取最新回复数
|
|
|
+ PurcOrderItem.getLatestReplyQty({orderItemId: item.id}, null, function (map) {
|
|
|
+ item.latestReplyQty = map.latestReplyQty;
|
|
|
+ });
|
|
|
});
|
|
|
$scope.order.total = sum;
|
|
|
if ($scope.order.display == 1) {//未查看的设为已查看
|
|
|
@@ -3922,7 +3926,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
var valid = true;
|
|
|
var validLapQty = 0;
|
|
|
angular.forEach(item.replies, function (r, i) {
|
|
|
- if (i > 0 && r.lapQty <= item.replies[i - 1].lapQty || r.lapQty == null) {
|
|
|
+ // 直接比较是字符串比较,需要先转换再比较 2017年9月7日 15:05:51
|
|
|
+ if (i > 0 && parseInt(r.lapQty) <= parseInt(item.replies[i - 1].lapQty) || r.lapQty == null) {
|
|
|
valid = false;
|
|
|
validLapQty = r.lapQty;
|
|
|
}
|
|
|
@@ -11103,7 +11108,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
title: '提示',
|
|
|
content: '确定删除角色(' + $scope.role.desc + ')吗?'
|
|
|
}, function () {
|
|
|
- AccountRole.remove({id: role.id}, function () {
|
|
|
+ AccountRole.remove({id: role.id}, {}, function () {
|
|
|
toaster.pop('success', '提示', '角色:' + $scope.role.desc + ' 删除成功');
|
|
|
$modalInstance.close(true);
|
|
|
}, function (response) {
|
|
|
@@ -11111,6 +11116,19 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
});
|
|
|
})
|
|
|
};
|
|
|
+ $scope.recover = function () {
|
|
|
+ new ngAlert({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定将“' + $scope.role.desc + '”恢复默认权限吗?'
|
|
|
+ }, function () {
|
|
|
+ AccountRole.recover({roleId: role.id}, {}, function () {
|
|
|
+ toaster.pop('success', '提示', '角色:' + $scope.role.desc + ' 恢复默认权限成功');
|
|
|
+ $modalInstance.close(true);
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '错误', response.data);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ };
|
|
|
}]);
|
|
|
|
|
|
/**
|