|
|
@@ -13287,6 +13287,32 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return '0天';
|
|
|
};
|
|
|
});
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公共询价计算时间差
|
|
|
+ */
|
|
|
+ app.filter('datespan', function () {
|
|
|
+ return function (time) {
|
|
|
+ if (time == null) {
|
|
|
+ return '剩余9999年';
|
|
|
+ }
|
|
|
+ var now = new Date().getTime(), span = time - now,
|
|
|
+ d = Math.ceil(span / 86400000), h = Math.ceil(span / 3600000),
|
|
|
+ m = Math.ceil(span / 60000);
|
|
|
+ if (d > 0) {
|
|
|
+ var day = d + 1;
|
|
|
+ return '剩余' + day + '天';
|
|
|
+ }
|
|
|
+ if (h > 0) {
|
|
|
+ return '剩余' + h + '小时';
|
|
|
+ }
|
|
|
+ if (m > 0) {
|
|
|
+ return '剩余' + m + '分钟';
|
|
|
+ }
|
|
|
+ return '已结束';
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
app.filter('firstchar', function () {
|
|
|
return function (str) {
|
|
|
if (str == null)
|
|
|
@@ -24215,7 +24241,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.reload();
|
|
|
}).error(function (data) {
|
|
|
$scope.loading = false;
|
|
|
- toaster.pop('error', '附件上传失败');
|
|
|
+ toaster.pop('error', '报价失败');
|
|
|
});
|
|
|
}
|
|
|
}]);
|