|
|
@@ -3343,6 +3343,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
*/
|
|
|
app.controller('ReplyByBatchCtrl', ['$scope', '$modalInstance', '$filter', 'toaster', function($scope, $modalInstance, $filter, toaster) {
|
|
|
$scope.activeTab = 'custom';
|
|
|
+ $scope.reply = {
|
|
|
+ method: 1
|
|
|
+ };
|
|
|
$scope.getMinDate = function () {
|
|
|
return $filter('date')(new Date, 'yyyy-MM-dd');
|
|
|
};
|
|
|
@@ -5188,7 +5191,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}]);
|
|
|
|
|
|
// 公共询价列表
|
|
|
- app.controller('PublicInquiryListCtrl', ['$scope', '$stateParams', 'PurchaseInquiry', '$filter', 'toaster', 'BaseService', 'ngTableParams', function ($scope, $stateParams, PurchaseInquiry, $filter, toaster, BaseService, ngTableParams) {
|
|
|
+ app.controller('PublicInquiryListCtrl', ['$scope', '$stateParams', 'PurchaseInquiry', '$filter', 'toaster', 'BaseService', 'ngTableParams', 'PurcInquiry', function ($scope, $stateParams, PurchaseInquiry, $filter, toaster, BaseService, ngTableParams, PurcInquiry) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
/**
|
|
|
* 改变单据日期范围
|
|
|
@@ -5223,6 +5226,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ $scope.active = 'all';
|
|
|
$scope.dateZoneText = '不限';
|
|
|
$scope.deliveryZoneText = '不限';
|
|
|
$scope.condition = {dateZone: -1};
|
|
|
@@ -5278,6 +5282,25 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return fn;
|
|
|
};
|
|
|
|
|
|
+ $scope.setActive = function (state) {
|
|
|
+ if ($scope.active != state) {
|
|
|
+ $scope.active = state;
|
|
|
+ if ($scope.tableParams.page() == 1) {
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ } else {
|
|
|
+ $scope.tableParams.page(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ var getService = function () {
|
|
|
+ if ($scope.active == 'teams') {
|
|
|
+ return PurchaseInquiry.hisquotation;
|
|
|
+ } else {
|
|
|
+ return PurchaseInquiry.publicInquiryItem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$scope.tableParams = new ngTableParams({
|
|
|
page: 1,
|
|
|
count: 20,
|
|
|
@@ -5301,7 +5324,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// AccountEnterprise.get({}, function(data){
|
|
|
// $scope.currentEn = data;
|
|
|
// });
|
|
|
- PurchaseInquiry.publicInquiryItem.call(null, BaseService.parseParams(pageParams), function (page) {
|
|
|
+ getService().call(null, BaseService.parseParams(pageParams), function (page) {
|
|
|
$scope.loading = false;
|
|
|
if (page) {
|
|
|
params.total(page.totalElement);
|
|
|
@@ -5324,15 +5347,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
+ // 得到消息
|
|
|
+ PurcInquiry.getMessage({}, function (data) {
|
|
|
+ $scope.message = data;
|
|
|
+ }, function (response) {
|
|
|
+
|
|
|
+ });
|
|
|
|
|
|
- $scope.datasetData = [
|
|
|
- {option : "这个是第一条数据"},
|
|
|
- {option : "这个是第二条数据"},
|
|
|
- {option : "这个是第三条数据"},
|
|
|
- {option : "这个是第四条数据"},
|
|
|
- {option : "这个是第五条数据"},
|
|
|
- {option : "这个是第六条数据"}
|
|
|
- ]
|
|
|
// 转客户询价
|
|
|
$scope.transtoInquiry = function (id) {
|
|
|
PurchaseInquiry.transtoInquiry({id: id}, {}, function (data) {
|