Browse Source

货车发货问题的处理

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@10812 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 years ago
parent
commit
6706df42d6

+ 2 - 1
src/main/java/com/uas/platform/b2b/controller/SaleInquiryController.java

@@ -398,6 +398,7 @@ public class SaleInquiryController {
 		pageInfo.filter("status", Status.REPLIED.value());
 		pageInfo.filter("invalid", Constant.NO);
 		pageInfo.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
+		pageInfo.filter("decideStatus", Status.UNAUDIT.value());
 		SearchFilter filter = JSONObject.parseObject(searchFilter, SearchFilter.class);
 		SearchFilter distribute = userService.distribute();
 		if (distribute != null && distribute.getDistribute() == null) {
@@ -443,7 +444,7 @@ public class SaleInquiryController {
 	@RequestMapping(value = "/info", params = RequestState.REFUSED, method = RequestMethod.GET)
 	@ResponseBody
 	public SPage<PurchaseInquiryItem> getPurchaseInquiriesRefused(PageParams params, String searchFilter) {
-		logger.log("客户询价单", "查看收到的客户询价单列表(已过期)");
+		logger.log("客户询价单", "查看收到的客户询价单列表(未采纳)");
 		PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("agreed", Constant.NO);
 		pageInfo.filter("status", Status.REPLIED.value());

+ 22 - 9
src/main/webapp/resources/js/index/app.js

@@ -1462,6 +1462,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 $rootScope.truck = [];
             });
         };
+        
         $scope.openTrack = function () {
             $modal.open({
                 templateUrl: 'static/tpl/index/sale/track.html',
@@ -1476,7 +1477,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         };
     }]);
 
-    app.controller('TruckModalCtrl', ['$scope', '$rootScope', '$modalInstance', 'SaleTruck', 'PurcNotice', 'toaster', '$state', '$filter', '$timeout', function ($scope, $rootScope, $modalInstance, SaleTruck, PurcNotice, toaster, $state, $filter, $timeout) {
+    app.controller('TruckModalCtrl', ['$scope', '$rootScope', '$modalInstance', 'SaleTruck', 'PurcNotice', 'toaster', '$state', '$filter', '$timeout', 'token', function ($scope, $rootScope, $modalInstance, SaleTruck, PurcNotice, toaster, $state, $filter, $timeout, token) {
         $scope.saleSend = {sendItems: []};
         SaleTruck.detail({}, function (data) {
             // 按物料编号排序
@@ -1513,6 +1514,16 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 $scope.lockstatus = false;
             }, 5000);
         }
+        var getToken = function() {
+        	if($scope.token == null) {
+        		token.info({userType: 'salenotice'}, {}, function(data) {
+        			$scope.token = data.token;
+        		}, function(response) {
+        			toaster.pop('error', '提示', response.data);
+        		});
+        	}
+        }
+        getToken();
         $scope.send = function () {// 发货
             if (!$scope.saleSend.code || $scope.saleSend.code == '') {//送货单号为空
                 toaster.pop('error', '错误', '请输入送货单号');
@@ -1541,13 +1552,15 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                     payments: payments,
                     sendItems: items
                 });
-                PurcNotice.sendByBatch({}, send, function (data) {
-                    toaster.pop('success', '提示', '发货成功,跳转至发货单:' + send.code);
-                    $modalInstance.close(true);
-                    $state.go('sale.send_detail', {id: data.id});
-                }, function (response) {
-                    toaster.pop('error', '错误', response.data);
-                });
+                if($scope.token != null) {
+                	PurcNotice.sendByBatch({token: $scope.token}, send, function (data) {
+                		toaster.pop('success', '提示', '发货成功,跳转至发货单:' + send.code);
+                		$modalInstance.close(true);
+                		$state.go('sale.send_detail', {id: data.id});
+                	}, function (response) {
+                		toaster.pop('error', '错误', response.data);
+                	});
+                }
             }
 
             $scope.setCheckedNoticeRead = function () {
@@ -15311,7 +15324,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
      // 查询代采定单在信扬中的审批情况
     app.controller('ViewApprovalDetailCtrl', ['$scope', 'toaster', '$modalInstance', 'DeputyOrder', 'BaseService', 'ngTableParams', 'uu', 'salecode', function ($scope, toaster, $modalInstance, DeputyOrder, BaseService, ngTableParams, uu, salecode) {
-        DeputyOrder.approve({uu: uu, code: salecode}, {}, function (data) {
+        DeputyOrder.approve({uu: uu, code: 'SS16214340'}, {}, function (data) {
             $scope.nodes = data.nodes;
             $scope.process = data.process;
             if(data.error) {