|
|
@@ -1,4 +1,4 @@
|
|
|
-+define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives', 'service/Purc', 'service/Make', 'service/Fa', 'service/Account', 'service/Alert', 'service/CheckTel', 'ui.router', 'ui.bootstrap', 'file-upload', 'ngSanitize', 'service/BaseInfo', 'service/Cart', 'service/ApprovalFlow', 'service/DeputyOrder', 'service/Product', 'service/Token', 'service/ProductUsers'], function () {
|
|
|
+define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives', 'service/Purc', 'service/Make', 'service/Fa', 'service/Account', 'service/Alert', 'service/CheckTel', 'ui.router', 'ui.bootstrap', 'file-upload', 'ngSanitize', 'service/BaseInfo', 'service/Cart', 'service/ApprovalFlow', 'service/DeputyOrder', 'service/Product', 'service/Token', 'service/ProductUsers'], function () {
|
|
|
'use strict';
|
|
|
var app = angular.module('myApp', ['toaster', 'angularCharts', 'ngTable', 'ui.router', 'common.services', 'common.directives', 'PurcServices', 'MakeServices', 'FaServices', 'AccountServices', 'AlertServices', 'ui.bootstrap', 'angularFileUpload', 'ngSanitize', 'CheckTelModule', 'ProductServices', 'CartServices', 'ApprvoalFlowService', 'DeputyOrderService', 'ProductInfoServices', 'TokenService', 'ProductUserService', 'ui.tour']);
|
|
|
app.init = function () {
|
|
|
@@ -2977,7 +2977,7 @@
|
|
|
};
|
|
|
}]);
|
|
|
|
|
|
- app.controller('SaleOrderCtrl', ['$scope', '$filter', 'PurcOrderItem', 'PurcOrder', 'ngTableParams', 'toaster', 'ReportService', 'BaseService', 'PurcOrderItemHis', 'PagingRelease', 'SnapshotService', 'PurcOrderItemInfo', 'token', 'CurrentRole', '$timeout', function ($scope, $filter, PurcOrderItem, PurcOrder, ngTableParams, toaster, ReportService, BaseService, PurcOrderItemHis, PagingRelease, SnapshotService, PurcOrderItemInfo, token, CurrentRole, $timeout) {
|
|
|
+ app.controller('SaleOrderCtrl', ['$scope', '$filter', 'PurcOrderItem', 'PurcOrder', 'ngTableParams', 'toaster', 'ReportService', 'BaseService', 'PurcOrderItemHis', 'PagingRelease', 'SnapshotService', 'PurcOrderItemInfo', 'token', 'CurrentRole', '$timeout', '$modal', function ($scope, $filter, PurcOrderItem, PurcOrder, ngTableParams, toaster, ReportService, BaseService, PurcOrderItemHis, PagingRelease, SnapshotService, PurcOrderItemInfo, token, CurrentRole, $timeout, $modal) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
|
|
|
// 判断是否为普通用户
|
|
|
@@ -3257,16 +3257,28 @@
|
|
|
}
|
|
|
});
|
|
|
if (!(str == '')) {
|
|
|
+ $scope.loading = false;
|
|
|
str = str.substr(0, str.length - 1);
|
|
|
- PurcOrderItem.replyByBatch(str, function () {
|
|
|
- $scope.loading = false;
|
|
|
- $scope.tableParams.reload();
|
|
|
- toaster.pop('success', '提示', '批量回复成功');
|
|
|
- }, function (response) {
|
|
|
- $scope.loading = false;
|
|
|
- toaster.pop('error', '批量回复失败', response.data);
|
|
|
+ var modalInstance = $modal.open({
|
|
|
+ animation: true,
|
|
|
+ templateUrl: 'static/tpl/index/sale/modal/reply_bybatch.html',
|
|
|
+ controller: 'ReplyByBatchCtrl',
|
|
|
+ resolve: {
|
|
|
+ enname: function () {
|
|
|
+ return name
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
+ // PurcOrderItem.replyByBatch(str, function () {
|
|
|
+ // $scope.loading = false;
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ // toaster.pop('success', '提示', '批量回复成功');
|
|
|
+ // }, function (response) {
|
|
|
+ // $scope.loading = false;
|
|
|
+ // toaster.pop('error', '批量回复失败', response.data);
|
|
|
+ // });
|
|
|
} else {//没有勾选其中的明细
|
|
|
+ toaster.pop('error', '提示', '请先选择需要回复的单据');
|
|
|
$scope.loading = false;
|
|
|
}
|
|
|
};
|
|
|
@@ -3322,6 +3334,14 @@
|
|
|
});
|
|
|
}
|
|
|
}]);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量回复模态框
|
|
|
+ */
|
|
|
+ app.controller('ReplyByBatchCtrl', ['$scope', '$modalInstance', function($scope, $modalInstance) {
|
|
|
+
|
|
|
+ }]);
|
|
|
+
|
|
|
app.controller('SaleOrderDetailCtrl', ['$scope', '$stateParams', 'PurcOrder', 'PurcOrderItem', 'toaster', 'ReportService', 'CurrentRole', 'token',function ($scope, $stateParams, PurcOrder, PurcOrderItem, toaster, ReportService, CurrentRole, token) {
|
|
|
// 获取当前用户是否为普通用户
|
|
|
CurrentRole.isUser({}, {}, function (data) {
|
|
|
@@ -5150,7 +5170,9 @@
|
|
|
} else if (zone == 7) { // 一星期内
|
|
|
date.setDate(date.getDate() - 7);
|
|
|
condition.dateFrom = date;
|
|
|
- condition.dateTo = new Date();
|
|
|
+ var ndate = new Date();
|
|
|
+ ndate.setDate(date.getDate() - 1);
|
|
|
+ condition.dateTo = ndate;
|
|
|
} else if (zone == 1) { // 一个月内
|
|
|
date.setMonth(date.getMonth() - 1);
|
|
|
condition.dateFrom = date;
|
|
|
@@ -5280,6 +5302,23 @@
|
|
|
{option : "这个是第五条数据"},
|
|
|
{option : "这个是第六条数据"}
|
|
|
]
|
|
|
+ // 转客户询价
|
|
|
+ $scope.transtoInquiry = function (id) {
|
|
|
+ PurchaseInquiry.transtoInquiry({id: id}, {}, function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '提示', data.success);
|
|
|
+ window.location.hash = "sale/inquiry/" + data.id;
|
|
|
+ }
|
|
|
+ if (data.error) {
|
|
|
+ toaster.pop('error', '提示', data.error);
|
|
|
+ }
|
|
|
+ if (data.info) {
|
|
|
+ toaster.pop('info', '提示', data.info);
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
}]);
|
|
|
|
|
|
/**
|