|
@@ -16995,7 +16995,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 保存
|
|
// 保存
|
|
|
$scope.isSave = false;
|
|
$scope.isSave = false;
|
|
|
$scope.save = function () {
|
|
$scope.save = function () {
|
|
|
- $scope.deOrder.entrystatus = '保存';
|
|
|
|
|
checkKeyword();
|
|
checkKeyword();
|
|
|
if ($scope.checkresult) {
|
|
if ($scope.checkresult) {
|
|
|
$scope.deOrder.totalamount = 0;
|
|
$scope.deOrder.totalamount = 0;
|
|
@@ -17020,7 +17019,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('error', '提示', '保存失败');
|
|
toaster.pop('error', '提示', '保存失败');
|
|
|
}
|
|
}
|
|
|
}, function (response) {
|
|
}, function (response) {
|
|
|
-
|
|
|
|
|
|
|
+ toaster.pop('error', '保存失败', response.data);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -17029,7 +17028,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 提交
|
|
// 提交
|
|
|
$scope.isSubmit = false;
|
|
$scope.isSubmit = false;
|
|
|
$scope.submit = function () {
|
|
$scope.submit = function () {
|
|
|
- $scope.deOrder.entrystatus = '已提交';
|
|
|
|
|
checkKeyword();
|
|
checkKeyword();
|
|
|
if ($scope.checkresult) {
|
|
if ($scope.checkresult) {
|
|
|
$scope.deOrder.totalamount = 0;
|
|
$scope.deOrder.totalamount = 0;
|
|
@@ -17042,7 +17040,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.deOrder.totalpayament += DecimalNumber.accMul(item.amount, item.unitprice);
|
|
$scope.deOrder.totalpayament += DecimalNumber.accMul(item.amount, item.unitprice);
|
|
|
$scope.deOrder.orderamount += DecimalNumber.accMul(item.amount, item.purcprice);
|
|
$scope.deOrder.orderamount += DecimalNumber.accMul(item.amount, item.purcprice);
|
|
|
});
|
|
});
|
|
|
- DeputyOrder.saveDeOrder({}, $scope.deOrder, function (data) {
|
|
|
|
|
|
|
+ DeputyOrder.submitDeOrder({}, $scope.deOrder, function (data) {
|
|
|
if (data.id) {
|
|
if (data.id) {
|
|
|
toaster.pop('success', '提示', '提交成功');
|
|
toaster.pop('success', '提示', '提交成功');
|
|
|
window.location.hash = "#/purc/deputy/" + data.id;
|
|
window.location.hash = "#/purc/deputy/" + data.id;
|
|
@@ -17051,7 +17049,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('error', '提示', '保存失败');
|
|
toaster.pop('error', '提示', '保存失败');
|
|
|
}
|
|
}
|
|
|
}, function (response) {
|
|
}, function (response) {
|
|
|
-
|
|
|
|
|
|
|
+ toaster.pop('error', '保存失败', response.data);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|