Parcourir la source

打印代采订单enuu参数,暂时改成信扬enuu

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@7707 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
dongbw il y a 9 ans
Parent
commit
757253c695
1 fichiers modifiés avec 42 ajouts et 26 suppressions
  1. 42 26
      src/main/webapp/resources/js/index/app.js

+ 42 - 26
src/main/webapp/resources/js/index/app.js

@@ -9552,10 +9552,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
         //打印
         $scope.print = function(deputyOrder) {
             DeputyOrder.printCount({id: deputyOrder.id},{});//增加打印此次
-            ReportService.print(deputyOrder.deputyuu, 'PURCNOTICE', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 定向采购通知
-            ReportService.print(deputyOrder.deputyuu, 'PURCHASE', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 采购订单
-            ReportService.print(deputyOrder.deputyuu, 'PAYCONFIRM', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 付款确认
-            ReportService.print(deputyOrder.deputyuu, 'TRADECONTRACT', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 买卖合同
+            // ReportService.print(deputyOrder.deputyuu, 'PURCNOTICE', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 定向采购通知
+            // ReportService.print(deputyOrder.deputyuu, 'PURCHASE', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 采购订单
+            // ReportService.print(deputyOrder.deputyuu, 'PAYCONFIRM', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 付款确认
+            // ReportService.print(deputyOrder.deputyuu, 'TRADECONTRACT', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 买卖合同
+            //TODO 目前只有信扬有代采业务,先写死之后再改
+            ReportService.print(10044118, 'PURCNOTICE', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 定向采购通知
+            ReportService.print(10044118, 'PURCHASE', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 采购订单
+            ReportService.print(10044118, 'PAYCONFIRM', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 付款确认
+            ReportService.print(10044118, 'TRADECONTRACT', "where purc$deputyorders.deo_id=" + deputyOrder.id); // 买卖合同
+
         };
 		
 		// 搜索框回车
@@ -9894,7 +9900,29 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
                     toaster.pop('error', '提示', data.error);
                 }
             });
-        }
+        };
+
+        // 可选的证照要求
+        $scope.certificates = [{name:'三/五证合一'}, {name:'营业执照'}, {name:'组织机构代码证'}, {name:'一般纳税人证明材料'},{name:'统计登记证'},{name:'社会保险登记证'}];
+
+        // 处理证照要求
+        var parseCertificate = function(a) {
+            if (a) {
+                var arr = a.split(',');
+                angular.forEach(arr, function(app) {
+                    var contained = false;
+                    angular.forEach($scope.certificates, function($app) {
+                        if($app.name == app) {
+                            $app.checked = true;
+                            contained = true;
+                        }
+                    });
+                    if(!contained) {
+                        $scope.certificates.push({name: app, checked: true});
+                    }
+                });
+            }
+        };
 
         $scope.condition = {dateZone: 1};
         $scope.tenderProd = [];
@@ -9968,6 +9996,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
             PurcTender.getOne({id: $stateParams.id}, function(data){
                 data.$editing = false;
                 $scope.tender = data;
+                parseCertificate($scope.tender.certificate);
                 $scope.firstProd = data.purchaseTenderProds[0];
                 console.log($scope.tender);
                 $scope.loading  = false;
@@ -9976,28 +10005,15 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
                 toaster.pop('error', '数据加载失败', response.data);
             });
         }
+        $scope.changeShipAddress = false;
+        $scope.changeAddress = function() {
+            if ($scope.changeShipAddress) {
+                $scope.changeShipAddress = false;
+            } else {
+                $scope.changeShipAddress = true;
+            }
+        };
 
-        // 可选的证照要求
-        $scope.certificates = [{name:'三/五证合一'}, {name:'营业执照'}, {name:'组织机构代码证'}, {name:'一般纳税人证明材料'},{name:'统计登记证'},{name:'社会保险登记证'}];
-
-        // 处理区域
-        // var parseCertificate = function(a) {
-        //     if (a) {
-        //         var arr = a.split(',');
-        //         angular.forEach(arr, function(app) {
-        //             var contained = false;
-        //             angular.forEach($scope.certificates, function($app) {
-        //                 if($app.name == app) {
-        //                     $app.checked = true;
-        //                     contained = true;
-        //                 }
-        //             });
-        //             if(!contained) {
-        //                 $scope.certificates.push({name: app, checked: true});
-        //             }
-        //         });
-        //     }
-        // };
 
         // 查找供应商
         $scope.dbfindVendor = function(){