|
|
@@ -71,14 +71,19 @@ define([ 'app/app' ], function(app) {
|
|
|
|
|
|
//选择相应的销售类型
|
|
|
$scope.sellType = function(type) {
|
|
|
- if($scope.batch.selfSellEabled) {
|
|
|
- $scope.batch.sellType = type;
|
|
|
- if (type == 'UAS') {
|
|
|
- $scope.setShowSelfSellRemindBox(true);
|
|
|
- }
|
|
|
- }else {
|
|
|
- $scope.batch.sellType = 'UAS';
|
|
|
- }
|
|
|
+ if (type == 'self') {
|
|
|
+ $scope.batch.selfSellEabled && ($scope.batch.sellType = type);
|
|
|
+ } else if (type == 'UAS') {
|
|
|
+ !$rootScope.isPcbStore && ($scope.batch.sellType = type && $scope.setShowSelfSellRemindBox(true));
|
|
|
+ }
|
|
|
+ // if($scope.batch.selfSellEabled) {
|
|
|
+ // $scope.batch.sellType = type;
|
|
|
+ // if (type == 'UAS') {
|
|
|
+ // $scope.setShowSelfSellRemindBox(true);
|
|
|
+ // }
|
|
|
+ // }else {
|
|
|
+ // $scope.batch.sellType = 'UAS';
|
|
|
+ // }
|
|
|
|
|
|
};
|
|
|
|
|
|
@@ -242,8 +247,9 @@ define([ 'app/app' ], function(app) {
|
|
|
} else {
|
|
|
var param = {selfSale : $scope.batch.sellType == 'self', currency : $scope.batch.currency, repeatImport : $scope.repeatImport};
|
|
|
}
|
|
|
+ var uploadUrl = $rootScope.isPcbStore ? '/release/product/batchRelease/pcb' : 'release/product/release/excel';
|
|
|
$upload.upload({
|
|
|
- url: 'release/product/release/excel',
|
|
|
+ url: uploadUrl,
|
|
|
file: file,
|
|
|
method: 'POST',
|
|
|
params : param
|
|
|
@@ -298,6 +304,7 @@ define([ 'app/app' ], function(app) {
|
|
|
// 下载模板
|
|
|
$scope.download = function() {
|
|
|
var show = SessionService.get($scope.userInfo.userUU + "-releasetip");
|
|
|
+ var downloadUrl = $rootScope.isPcbStore ? '/release/product/release/template/pcb' : '/release/product/release/template'
|
|
|
if (!show) {
|
|
|
var modalInstance = $modal.open({
|
|
|
animation: true,
|
|
|
@@ -306,10 +313,10 @@ define([ 'app/app' ], function(app) {
|
|
|
});
|
|
|
modalInstance.result.then(function(response) {
|
|
|
}, function(res) {
|
|
|
- window.location.href = $rootScope.rootPath + '/release/product/release/template?currency' + '=' + $scope.batch.currency + ($rootScope.$$productOn.tab == 'bathOnPerson' ? '&isPerson=1' : '');
|
|
|
+ window.location.href = $rootScope.rootPath + downloadUrl + '?currency=' + $scope.batch.currency + ($rootScope.$$productOn.tab == 'bathOnPerson' ? '&isPerson=1' : '');
|
|
|
});
|
|
|
} else {
|
|
|
- window.location.href = $rootScope.rootPath + '/release/product/release/template?currency' + '=' + $scope.batch.currency + ($rootScope.$$productOn.tab == 'bathOnPerson' ? '&isPerson=1' : '');
|
|
|
+ window.location.href = $rootScope.rootPath + downloadUrl + '?currency=' + $scope.batch.currency + ($rootScope.$$productOn.tab == 'bathOnPerson' ? '&isPerson=1' : '');
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -395,6 +402,7 @@ define([ 'app/app' ], function(app) {
|
|
|
} else {
|
|
|
var datatem = {isAjax : true, batch : $scope.result.batch};
|
|
|
}
|
|
|
+ var downloadFailureUrl = $rootScope.isPcbStore ? '/release/product/release/failure/pcb/xls' : 'release/product/release/failure/xls';
|
|
|
if($scope.result && $scope.result.batch && $scope.result.filter) {
|
|
|
var form = document.getElementById('load-error');
|
|
|
form.action= 'release/product/release/failure/xls';
|
|
|
@@ -404,7 +412,7 @@ define([ 'app/app' ], function(app) {
|
|
|
var getDownLoadStatus = function () {
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
- url: 'release/product/release/failure/xls',
|
|
|
+ url: downloadFailureUrl,
|
|
|
data : datatem,
|
|
|
dataType : 'json',
|
|
|
success: function (data) {
|