|
|
@@ -883,7 +883,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}]);
|
|
|
|
|
|
app.controller('PagingReleaseCtrl', ['$scope', 'PagingRelease', 'BaseService', 'ngTableParams', 'toaster', '$modalInstance', 'PagingReleaseInfo', function ($scope, PagingRelease, BaseService, ngTableParams, toaster, $modalInstance, PagingReleaseInfo) {
|
|
|
- BaseService.scrollBackToTop();
|
|
|
+ // BaseService.scrollBackToTop();
|
|
|
$scope.active = "todo";
|
|
|
$scope.searchStatus = false; // 默认从数据库直接获取
|
|
|
$scope.setActive = function (state) {
|
|
|
@@ -2757,12 +2757,15 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 需方 打印 采购单
|
|
|
$scope.custPrint = function (order) {
|
|
|
+ var newPage = window.open("about:blank");
|
|
|
PurcOrder.printPermission({}, function () {
|
|
|
PurcOrder.custPrintCount({id: order.id}, {});//增加打印此次
|
|
|
- ReportService.print(order.enUU, 'PURCLIST_CUST', "where purc$orders.pu_id=" + order.id);
|
|
|
+ ReportService.print(order.enUU, 'PURCLIST_CUST', "where purc$orders.pu_id=" + order.id, newPage);
|
|
|
}, function (response) {
|
|
|
+ newPage.close();
|
|
|
toaster.pop('error', '打印失败', response.data);
|
|
|
});
|
|
|
+
|
|
|
};
|
|
|
|
|
|
$scope.openDatePicker = function ($event, item, openParam) {
|
|
|
@@ -2942,7 +2945,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
};
|
|
|
}]);
|
|
|
|
|
|
- app.controller('SaleOrderCtrl', ['$scope', '$filter', 'PurcOrderItem', 'PurcOrder', 'ngTableParams', 'toaster', 'ReportService', 'BaseService', 'PurcOrderItemHis', 'PagingRelease', 'SnapshotService', 'PurcOrderItemInfo', 'token', 'CurrentRole', function ($scope, $filter, PurcOrderItem, PurcOrder, ngTableParams, toaster, ReportService, BaseService, PurcOrderItemHis, PagingRelease, SnapshotService, PurcOrderItemInfo, token, CurrentRole) {
|
|
|
+ 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) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
|
|
|
// 判断是否为普通用户
|
|
|
@@ -3156,15 +3159,16 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
//打印 采购单
|
|
|
$scope.print = function (order) {
|
|
|
+ var newPage = window.open("about:blank");
|
|
|
PurcOrder.printPermission({}, function () {
|
|
|
PurcOrder.printCount({id: order.id}, {});//增加打印此次 // 在此方法内添加记录日志
|
|
|
if (order.display == 1) $scope.setDisplay('setRead', order.id);//设置为已查看状态
|
|
|
- ReportService.print(order.enUU, 'PURCLIST', "where purc$orders.pu_id=" + order.id);
|
|
|
+ ReportService.print(order.enUU, 'PURCLIST', "where purc$orders.pu_id=" + order.id , newPage);
|
|
|
$scope.tableParams.reload();
|
|
|
},function (response) {
|
|
|
+ newPage.close();
|
|
|
toaster.pop('error', '打印失败', response.data);
|
|
|
});
|
|
|
-
|
|
|
};
|
|
|
|
|
|
$scope.getReply = function (item) {
|
|
|
@@ -3356,10 +3360,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 采购单
|
|
|
$scope.print = function (order) {
|
|
|
+ var newPage = window.open("about:blank");
|
|
|
PurcOrder.printPermission({}, function () {
|
|
|
PurcOrder.printCount({id: order.id}, {});//增加打印此次
|
|
|
- ReportService.print(order.enUU, 'PURCLIST', "where purc$orders.pu_id=" + order.id);
|
|
|
+ ReportService.print(order.enUU, 'PURCLIST', "where purc$orders.pu_id=" + order.id, newPage);
|
|
|
},function (response) {
|
|
|
+ newPage.close();
|
|
|
toaster.pop('error', '打印失败', response.data);
|
|
|
});
|
|
|
};
|
|
|
@@ -7004,11 +7010,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
//打印 发货单
|
|
|
$scope.print = function (send) {
|
|
|
+ var newPage = window.open("about:blank");
|
|
|
SaleSend.printPermission({}, function () {
|
|
|
SaleSend.printCount({id: send.id}, {}); //增加打印此次
|
|
|
+ ReportService.print(send.custUU, 'SALESEND', "where sale$send.ss_id=" + send.id, newPage);
|
|
|
$scope.tableParams.reload();
|
|
|
- ReportService.print(send.custUU, 'SALESEND', "where sale$send.ss_id=" + send.id);
|
|
|
}, function (response) {
|
|
|
+ newPage.close();
|
|
|
toaster.pop('error', '打印失败', response.data);
|
|
|
});
|
|
|
};
|
|
|
@@ -7740,10 +7748,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
};
|
|
|
//打印 样品采购单
|
|
|
$scope.print = function (sample) {
|
|
|
+ var newPage = window.open("about:blank");
|
|
|
PurcSample.printPermission({}, function () {
|
|
|
PurcSample.printCount({id: sample.id}, {});//增加打印此次
|
|
|
- ReportService.print(sample.proofing.enUU, 'PURCPROOFING', "where purc$proofingitems.ppi_id =" + sample.id);
|
|
|
+ ReportService.print(sample.proofing.enUU, 'PURCPROOFING', "where purc$proofingitems.ppi_id =" + sample.id, newPage);
|
|
|
}, function (response) {
|
|
|
+ newPage.close();
|
|
|
toaster.pop('error', '打印失败', response.data);
|
|
|
});
|
|
|
};
|
|
|
@@ -9547,10 +9557,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
//打印 对账单
|
|
|
$scope.print = function (check) {
|
|
|
+ var newPage = window.open("about:blank");
|
|
|
FaApCheck.printPermission({}, function () {
|
|
|
FaApCheck.printCount({id: check.id}, {});//增加打印此次
|
|
|
- ReportService.print(check.custUu, 'PURCCHECK', 'where purc$apcheck.pa_id =' + check.id);
|
|
|
+ ReportService.print(check.custUu, 'PURCCHECK', 'where purc$apcheck.pa_id =' + check.id, newPage);
|
|
|
}, function (response) {
|
|
|
+ newPage.close();
|
|
|
toaster.pop('error', '打印失败', response.data);
|
|
|
});
|
|
|
};
|