|
|
@@ -5745,7 +5745,18 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 提交
|
|
|
$scope.submit = function () {
|
|
|
$scope.loading = true;
|
|
|
+ if (!$scope.item.quotation.code) //新增,设单号
|
|
|
+ $scope.item.quotation.code = 'BJ' + $filter('date')(new Date(), 'yyMMddHHmmss_sss');
|
|
|
+ $scope.item.quotation.custUU = $scope.item.quotation.cust.uu;
|
|
|
+ $scope.item.quotation.custUserUU = $scope.item.quotation.custUser.userUU;
|
|
|
+ $scope.item.productId = $scope.item.product.id;
|
|
|
$scope.item.quotation.status = 101;//已提交
|
|
|
+ if ($scope.item.quotation.date instanceof Date) {
|
|
|
+ $scope.item.quotation.date = $scope.item.quotation.date.getTime();
|
|
|
+ }
|
|
|
+ if ($scope.item.quotation.endDate instanceof Date) {
|
|
|
+ $scope.item.quotation.endDate = $scope.item.quotation.endDate.getTime();
|
|
|
+ }
|
|
|
Quotation.save({}, $scope.item, function (data) {
|
|
|
$scope.loading = false;
|
|
|
toaster.pop('success', '成功', '提交成功');
|