|
|
@@ -3916,20 +3916,24 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
*/
|
|
|
app.controller('SaleAcceptCtrl', ['$scope', '$filter', 'PurcAccept', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', function($scope, $filter, PurcAccept, ngTableParams, toaster, BaseService, Symbol){
|
|
|
$scope.active = 'all';
|
|
|
- $scope.agreedText = '全部';
|
|
|
- $scope.dateZoneText = '一个月内';
|
|
|
- $scope.condition = {dateZone: 1};
|
|
|
- $scope.currency = Symbol.currency;//将币别转化为对应的符号
|
|
|
- $scope.changeAgreed = function(agreed) {
|
|
|
- $scope.condition.agreed = agreed;
|
|
|
- $scope.agreedText = typeof agreed == 'undefined' ? '全部' : (agreed == 1 ? '已同意' : '不同意');
|
|
|
- $scope.condition.$agreedOpen = false;
|
|
|
- };
|
|
|
- $scope.changeDateZone = function(zone) {
|
|
|
- $scope.condition.dateZone = zone;
|
|
|
- $scope.dateZoneText = typeof zone == 'undefined' ? '半年前' : (zone == 1 ? '一个月内' : '半年内');
|
|
|
- $scope.condition.$dateZoneOpen = false;
|
|
|
- };
|
|
|
+ $scope.dateZoneText = '不限';
|
|
|
+ $scope.deliveryZoneText = '不限';
|
|
|
+ $scope.condition = {dateZone: -1, deliveryZone: -1};
|
|
|
+ $scope.changeDateZone = function(zone) {
|
|
|
+ $scope.condition.dateZone = zone;
|
|
|
+ $scope.dateZoneText = typeof zone == 'undefined' ? '半年前' : (zone == -1 ? '不限' : (zone == 1 ? '一个月内' : '半年内'));
|
|
|
+ $scope.condition.$dateZoneOpen = false;
|
|
|
+ getDateCondition(zone, $scope.condition);
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ };
|
|
|
+ $scope.changeDeliveryZone = function(zone) {
|
|
|
+ $scope.condition.deliveryZoneText = zone;
|
|
|
+ $scope.deliveryZoneText = typeof zone == 'undefined' ? '不限' : (zone == -1 ? '不限' : (zone == 1 ? '一个月内' : '两个月内'));
|
|
|
+ $scope.condition.$delievryZoneOpen = false;
|
|
|
+ getDelveryCondition(zone, $scope.condition);
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ };
|
|
|
+
|
|
|
$scope.setActive = function(state) {
|
|
|
if($scope.active != state) {
|
|
|
$scope.active = state;
|
|
|
@@ -3955,13 +3959,18 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
getData : function($defer, params) {
|
|
|
$scope.loading = true;
|
|
|
var pageParams = params.url();
|
|
|
- pageParams.keyword = $scope.keyword;
|
|
|
+ pageParams.searchFilter = { // 筛选条件
|
|
|
+ keyword: $scope.keyword,
|
|
|
+ fromDate: getDateTime($scope.condition.dateFrom),
|
|
|
+ endDate: getDateTime($scope.condition.dateTo)
|
|
|
+ };
|
|
|
getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
$scope.loading = false;
|
|
|
if(page) {
|
|
|
+ console.log(pageParams.searchFilter);
|
|
|
params.total(page.totalElement);
|
|
|
$defer.resolve(page.content);
|
|
|
- $scope.keywordXls = angular.copy($scope.keyword);//保存当前取值的关键词
|
|
|
+ $scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的关键词
|
|
|
}
|
|
|
}, function(response){
|
|
|
$scope.loading = false;
|
|
|
@@ -3976,6 +3985,17 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
item[openParam] = !item[openParam];
|
|
|
};
|
|
|
|
|
|
+ $scope.parseDate = function(dateStr) {
|
|
|
+ if(dateStr)
|
|
|
+ return Date.parse(dateStr, 'yyyy-MM-dd');
|
|
|
+ return new Date();
|
|
|
+ };
|
|
|
+ // 选择查找日期
|
|
|
+ $scope.onDateCondition = function(){
|
|
|
+ $scope.tableParams.page(1);
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ };
|
|
|
+
|
|
|
// 搜索框回车
|
|
|
$scope.onSearch = function() {
|
|
|
$scope.tableParams.page(1);
|
|
|
@@ -5665,7 +5685,6 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
$scope.master = [];
|
|
|
AccountRole.query({}, function(data){
|
|
|
if(user && data) {
|
|
|
- console.log(user);
|
|
|
var rs = [], checked = [];
|
|
|
angular.forEach(user.roles, function(r){
|
|
|
rs.push(r.id);
|
|
|
@@ -5698,7 +5717,6 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
$scope.close = function(save) {
|
|
|
if(save) {
|
|
|
if(user.userUU) {
|
|
|
- console.log(user);
|
|
|
user.roles = $scope.checked;
|
|
|
AccountUser.update({}, user, function(){
|
|
|
toaster.pop('success', '提示', '保存成功');
|