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

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

parent 3b0221dc
......@@ -157,7 +157,7 @@
</div>
</div>
<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>
</div>
</div>
......
......@@ -26,6 +26,7 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco
$scope.factories = [];
$scope.suppliers = [];
$scope.genBarcodeClickLoading = false;
//functions
$scope.query = function () {
......@@ -311,6 +312,7 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco
};
$scope.genBarcodeClick = function () {
$scope.genBarcodeClickLoading = true;
// check
var canApplyFlag = true;
angular.forEach($scope.barcodeGridOptions.data, function (item) {
......@@ -345,16 +347,20 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco
if (response.data) {
if (response.data.code == '0') {
UtilService.showInfo("申请防伪码成功");
$scope.genBarcodeClickLoading = false;
$('#get-barcode-dlg').modal('hide');
} else {
UtilService.showError("申请防伪码失败:<br>" + response.data.message);
$scope.genBarcodeClickLoading = false;
}
} else {
UtilService.showError("申请防伪码失败:<br>" + response);
$scope.genBarcodeClickLoading = false;
}
}, function (response) {
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