Commit 67f5c7e1 authored by 顾俭's avatar 顾俭

防伪码送货单 取消审核

parent e3de36b7
......@@ -310,6 +310,12 @@ angular.module('IOne').controller('DeliveryOrderQueryController', function ($sco
}
};
if ($scope.queryCondition.poMst.supplier.useBarcode !== 'Y') {
$scope.releaseMsg = "审核";
} else {
$scope.releaseMsg = "发布";
}
var promises = [
DoDtlProductFileService.getAllByExample(condition), DoDtlProductLabelFileService.getAllByExample(condition)
];
......@@ -347,21 +353,21 @@ angular.module('IOne').controller('DeliveryOrderQueryController', function ($sco
if (checkResponse.data.message == 'success') {
DoMstFileService.release($scope.currentDeliveryOrder.id).then(function (releaseResponse) {
if (releaseResponse.data.code == '0') {
UtilService.showInfo("成功。");
UtilService.showInfo($scope.releaseMsg + "成功。");
$scope.uiOption.releasing = false;
$scope.queryDeliveryOrderDetails();
} else {
UtilService.showError("失败:<br>" + releaseResponse.data.message);
UtilService.showError($scope.releaseMsg + "失败:<br>" + releaseResponse.data.message);
$scope.uiOption.releasing = false;
$scope.queryDeliveryOrderDetails();
}
}, function (releaseError) {
UtilService.showError("失败:<br>" + (releaseError.data.externalError || releaseError.data.error));
UtilService.showError($scope.releaseMsg + "失败:<br>" + (releaseError.data.externalError || releaseError.data.error));
$scope.uiOption.releasing = false;
$scope.queryDeliveryOrderDetails();
})
} else {
UtilService.showError("失败:<br>" + checkResponse.data.message);
UtilService.showError($scope.releaseMsg + "失败:<br>" + checkResponse.data.message);
$scope.uiOption.releasing = false;
}
}, function () {
......@@ -374,35 +380,27 @@ angular.module('IOne').controller('DeliveryOrderQueryController', function ($sco
$scope.unrelease = function () {
if ($scope.currentDeliveryOrder) {
$scope.uiOption.unReleasing = true;
if ($scope.queryCondition.poMst.supplier.useBarcode !== 'Y') {
$scope.unReleaseMsg = "取消审核";
} else {
$scope.unReleaseMsg = "发布撤回";
}
DoMstFileService.unrelease($scope.currentDeliveryOrder.id).then(function (response) {
if (response.data) {
if (response.data.code == '0') {
if ($scope.currentDeliveryOrder.printed == '1') {
UtilService.showInfo("发布撤回成功, 该送货单标签已打印,请注意回收原标签,原标签不可使用!");
UtilService.showInfo($scope.unReleaseMsg + "成功, 该送货单标签已打印,请注意回收原标签,原标签不可使用!");
} else {
UtilService.showInfo("发布撤回成功。");
UtilService.showInfo($scope.unReleaseMsg + "成功。");
}
angular.forEach($scope.gridOptions.data, function (item) {
if (item.doMst.deliveryOrderUid === $scope.currentDeliveryOrder.deliveryOrderUid) {
item.doMst.released = '0';
item.doMst.releasedDate = null;
item.doMst.releasor = null;
item.doMst.printed = '0';
item.doMst.printedDate = null;
item.doMst.printer = null;
item.doMst.sentToErp = false;
item.doMst.sentToErpStatus = '未同步';
item.doMst.sentToErpInfo = '';
}
});
} else {
UtilService.showError("发布撤回失败:<br>" + response.data.message);
$scope.queryDeliveryOrderDetails();
UtilService.showError($scope.unReleaseMsg + "失败:<br>" + response.data.message);
}
$scope.queryDeliveryOrderDetails();
}
$scope.uiOption.unReleasing = false;
}, function (response) {
UtilService.showError("发布撤回失败:<br>" + response.data.externalError);
UtilService.showError($scope.unReleaseMsg + "失败:<br>" + response.data.externalError);
$scope.queryDeliveryOrderDetails();
$scope.uiOption.unReleasing = false;
})
......
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