|
|
@@ -2029,8 +2029,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 导出客户资料列表
|
|
|
$scope.exportXls = function () {
|
|
|
- VendorService.exportXls.query({keyword: $scope.keywordXls}, {}, function () {
|
|
|
- // window.location.href = window.location.origin + 'vendor/customer/xls?keyword='+$scope.keywordXls;
|
|
|
+ VendorService.exportXls.get({}, {}, function (data) {
|
|
|
+ if (data.success){
|
|
|
+ window.location.href = window.location.origin + '/vendor/customer/xls?keyword='+ ($scope.keywordXls || '');
|
|
|
+ }
|
|
|
}, function (response) {
|
|
|
toaster.pop('error', '数据加载失败', response.data);
|
|
|
});
|
|
|
@@ -3231,6 +3233,17 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ // 导出
|
|
|
+ $scope.exportXls = function () {
|
|
|
+ PurcOrderItem.exportXls({}, {}, function (data) {
|
|
|
+ if (data.success){
|
|
|
+ window.location.href = window.location.origin + '/sale/orders/xls?_state='+$scope.active+'&searchFilter='+angular.toJson($scope.searchFilterXls);
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
}]);
|
|
|
app.controller('SaleOrderDetailCtrl', ['$scope', '$stateParams', 'PurcOrder', 'PurcOrderItem', 'toaster', 'ReportService', 'CurrentRole', function ($scope, $stateParams, PurcOrder, PurcOrderItem, toaster, ReportService, CurrentRole) {
|
|
|
// 获取当前用户是否为普通用户
|
|
|
@@ -3488,6 +3501,17 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
+
|
|
|
+ // 导出
|
|
|
+ $scope.exportXls = function () {
|
|
|
+ PurcChange.exportXls({}, {}, function (data) {
|
|
|
+ if (data.success){
|
|
|
+ window.location.href = window.location.origin + '/sale/changes/xls?_state='+$scope.active+'&searchFilter='+angular.toJson($scope.searchFilterXls);
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
}]);
|
|
|
app.controller('SaleChangeDetailCtrl', ['$scope', '$stateParams', 'PurcChange', 'toaster', 'CurrentRole', function ($scope, $stateParams, PurcChange, toaster, CurrentRole) {
|
|
|
// 获取当前用户是否为普通用户
|
|
|
@@ -3866,13 +3890,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 导出
|
|
|
$scope.exportXls = function () {
|
|
|
- PurcInquiry.exportXls({_state: $scope.active, searchFilter: $scope.searchFilterXls}, {}, function () {
|
|
|
- window.location.href = window.location.origin + '/sale/inquiry/xls?_state='+$scope.active+'&searchFilter='+angular.toJson($scope.searchFilterXls);
|
|
|
+ PurcInquiry.exportXls({}, {}, function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ window.location.href = window.location.origin + '/sale/inquiry/xls?_state='+$scope.active+'&searchFilter='+angular.toJson($scope.searchFilterXls);
|
|
|
+ }
|
|
|
}, function (response) {
|
|
|
toaster.pop('error', '数据加载失败', response.data);
|
|
|
})
|
|
|
- console.log(window.location.origin);
|
|
|
- console.log(window.location.pathname );
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
@@ -5650,6 +5674,16 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return new Date();
|
|
|
};
|
|
|
|
|
|
+ // 导出客户资料列表
|
|
|
+ $scope.exportXls = function () {
|
|
|
+ PurcInquiryMould.exportXls({}, {}, function (data) {
|
|
|
+ if (data.success){
|
|
|
+ window.location.href = window.location.origin + '/sale/mould/xls?_state='+$scope.active+'&searchFilter='+angular.toJson($scope.searchFilterXls);
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
}]);
|
|
|
|
|
|
|
|
|
@@ -12623,8 +12657,10 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
|
|
|
$scope.exportXls = function () {
|
|
|
- GetProductInfo.exportXls({_state: $scope.active, keyword: $scope.keywordXls},{}, function () {
|
|
|
- window.location.href = window.location.origin + 'product/baseInfo/xls?_state='+$scope.active+'&keyword='+keyword;
|
|
|
+ GetProductInfo.exportXls({},{}, function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ window.location.href = window.location.origin + '/product/baseInfo/xls?_state='+$scope.active+'&keyword='+ (keyword || '');
|
|
|
+ }
|
|
|
}, function (response) {
|
|
|
toaster.pop('error', '数据加载失败', response.data);
|
|
|
})
|