Commit 3c596c25 authored by 顾俭's avatar 顾俭

aship/aship#5 防伪码功能-调整

parent 3b0221dc
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary" type="button" ng-click="genBarcodeClick()">确认</button> <button class="btn btn-primary" type="button" ng-click="genBarcodeClick()" ng-disabled="genBarcodeClickLoading">确认</button>
<button class="btn btn-primary" type="button" data-dismiss="modal">取消</button> <button class="btn btn-primary" type="button" data-dismiss="modal">取消</button>
</div> </div>
</div> </div>
......
...@@ -26,6 +26,7 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco ...@@ -26,6 +26,7 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco
$scope.factories = []; $scope.factories = [];
$scope.suppliers = []; $scope.suppliers = [];
$scope.genBarcodeClickLoading = false;
//functions //functions
$scope.query = function () { $scope.query = function () {
...@@ -311,6 +312,7 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco ...@@ -311,6 +312,7 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco
}; };
$scope.genBarcodeClick = function () { $scope.genBarcodeClick = function () {
$scope.genBarcodeClickLoading = true;
// check // check
var canApplyFlag = true; var canApplyFlag = true;
angular.forEach($scope.barcodeGridOptions.data, function (item) { angular.forEach($scope.barcodeGridOptions.data, function (item) {
...@@ -345,16 +347,20 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco ...@@ -345,16 +347,20 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco
if (response.data) { if (response.data) {
if (response.data.code == '0') { if (response.data.code == '0') {
UtilService.showInfo("申请防伪码成功"); UtilService.showInfo("申请防伪码成功");
$scope.genBarcodeClickLoading = false;
$('#get-barcode-dlg').modal('hide'); $('#get-barcode-dlg').modal('hide');
} else { } else {
UtilService.showError("申请防伪码失败:<br>" + response.data.message); UtilService.showError("申请防伪码失败:<br>" + response.data.message);
$scope.genBarcodeClickLoading = false;
} }
} else { } else {
UtilService.showError("申请防伪码失败:<br>" + response); UtilService.showError("申请防伪码失败:<br>" + response);
$scope.genBarcodeClickLoading = false;
} }
}, function (response) { }, function (response) {
UtilService.showError("申请防伪码失败:<br>" + response.data); UtilService.showError("申请防伪码失败:<br>" + response.data);
$('#get-barcode-dlg').modal('hide'); $scope.genBarcodeClickLoading = false;
// $('#get-barcode-dlg').modal('hide');
} }
); );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment