Browse Source

Merge branch 'dev' into release-20170915

suntg 8 years ago
parent
commit
3d2913351a

+ 89 - 89
pom.xml

@@ -491,46 +491,46 @@
 					<target>1.7</target>
 				</configuration>
 			</plugin>
-			<!--<plugin>-->
-				<!--<groupId>com.samaxes.maven</groupId>-->
-				<!--<artifactId>minify-maven-plugin</artifactId>-->
-				<!--<version>1.7.4</version>-->
-				<!--&lt;!&ndash; 静态文件压缩 &ndash;&gt;-->
-				<!--<executions>-->
-					<!--<execution>-->
-						<!--<id>default-minify</id>-->
-						<!--<phase>prepare-package</phase>-->
-						<!--<configuration>-->
-							<!--<charset>UTF-8</charset>-->
-							<!--<skipMerge>true</skipMerge>-->
-							<!--<closureLanguage>ECMASCRIPT5</closureLanguage>-->
-							<!--<closureAngularPass>true</closureAngularPass>-->
-							<!--<nosuffix>true</nosuffix>-->
-							<!--<webappTargetDir>${project.build.directory}/minify</webappTargetDir>-->
-							<!--<cssSourceDir>resources</cssSourceDir>-->
-							<!--<cssEngine>YUI</cssEngine>-->
-							<!--<jsSourceDir>resources</jsSourceDir>-->
-							<!--<jsEngine>YUI</jsEngine>-->
-							<!--<cssSourceIncludes>-->
-								<!--<cssSourceInclude>css/**/*.css</cssSourceInclude>-->
-								<!--<cssSourceInclude>data/**/*.json</cssSourceInclude>-->
-							<!--</cssSourceIncludes>-->
-							<!--<cssSourceExcludes>-->
-								<!--<cssSourceExclude>css/**/*.min.css</cssSourceExclude>-->
-							<!--</cssSourceExcludes>-->
-							<!--<jsSourceIncludes>-->
-								<!--<jsSourceInclude>js/**/*.js</jsSourceInclude>-->
-							<!--</jsSourceIncludes>-->
-							<!--<jsSourceExcludes>-->
-								<!--<jsSourceExclude>js/**/*.min.js</jsSourceExclude>-->
-							<!--</jsSourceExcludes>-->
-						<!--</configuration>-->
-						<!--<goals>-->
-							<!--<goal>minify</goal>-->
-						<!--</goals>-->
-					<!--</execution>-->
-				<!--</executions>-->
-			<!--</plugin>-->
+			<plugin>
+				<groupId>com.samaxes.maven</groupId>
+				<artifactId>minify-maven-plugin</artifactId>
+				<version>1.7.4</version>
+				<!-- 静态文件压缩 -->
+				<executions>
+					<execution>
+						<id>default-minify</id>
+						<phase>prepare-package</phase>
+						<configuration>
+							<charset>UTF-8</charset>
+							<skipMerge>true</skipMerge>
+							<closureLanguage>ECMASCRIPT5</closureLanguage>
+							<closureAngularPass>true</closureAngularPass>
+							<nosuffix>true</nosuffix>
+							<webappTargetDir>${project.build.directory}/minify</webappTargetDir>
+							<cssSourceDir>resources</cssSourceDir>
+							<cssEngine>YUI</cssEngine>
+							<jsSourceDir>resources</jsSourceDir>
+							<jsEngine>YUI</jsEngine>
+							<cssSourceIncludes>
+								<cssSourceInclude>css/**/*.css</cssSourceInclude>
+								<cssSourceInclude>data/**/*.json</cssSourceInclude>
+							</cssSourceIncludes>
+							<cssSourceExcludes>
+								<cssSourceExclude>css/**/*.min.css</cssSourceExclude>
+							</cssSourceExcludes>
+							<jsSourceIncludes>
+								<jsSourceInclude>js/**/*.js</jsSourceInclude>
+							</jsSourceIncludes>
+							<jsSourceExcludes>
+								<jsSourceExclude>js/**/*.min.js</jsSourceExclude>
+							</jsSourceExcludes>
+						</configuration>
+						<goals>
+							<goal>minify</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
 			<plugin>
 				<artifactId>maven-resources-plugin</artifactId>
 				<executions>
@@ -552,55 +552,55 @@
 					</execution>
 				</executions>
 			</plugin>
-			<!--<plugin>-->
-				<!--<groupId>com.uas.plugins</groupId>-->
-				<!--<artifactId>static-maven-plugin</artifactId>-->
-				<!--<version>0.0.2-SNAPSHOT</version>-->
-				<!--&lt;!&ndash; 静态资源分离 &ndash;&gt;-->
-				<!--<executions>-->
-					<!--<execution>-->
-						<!--<id>default-static</id>-->
-						<!--<phase>prepare-package</phase>-->
-						<!--<configuration>-->
-							<!--<pathMatcher>static</pathMatcher>-->
-							<!--<staticUrl>${static-path}</staticUrl>-->
-							<!--<webappDir>${project.build.directory}/minify</webappDir>-->
-							<!--<sourceDir>/</sourceDir>-->
-							<!--<targetDir>${project.build.directory}/statics</targetDir>-->
-							<!--<staticDir>/</staticDir>-->
-							<!--<sourceIncludes>-->
-								<!--<sourceInclude>resources/js/**/*.js</sourceInclude>-->
-								<!--<sourceInclude>resources/data/**/*.json</sourceInclude>-->
-								<!--<sourceInclude>resources/view/**/*.html</sourceInclude>-->
-								<!--<sourceInclude>WEB-INF/views/**/*.html</sourceInclude>-->
-							<!--</sourceIncludes>-->
-							<!--&lt;!&ndash; http://static.ubtoc.com/css/index.css?_v=1450321871828 &ndash;&gt;-->
-							<!--<versionSuffix>-->
-								<!--<suffix>?_v=${timestamp}</suffix>-->
-								<!--<exclude>*/require.js,*.min.js,*.min.css</exclude>-->
-							<!--</versionSuffix>-->
-						<!--</configuration>-->
-						<!--<goals>-->
-							<!--<goal>static</goal>-->
-						<!--</goals>-->
-					<!--</execution>-->
-				<!--</executions>-->
-			<!--</plugin>-->
-			<!--<plugin>-->
-				<!--<groupId>org.apache.maven.plugins</groupId>-->
-				<!--<artifactId>maven-war-plugin</artifactId>-->
-				<!--<version>2.4</version>-->
-				<!--<configuration>-->
-					<!--<webResources>-->
-						<!--<resource>-->
-							<!--<directory>${project.build.directory}/statics</directory>-->
-						<!--</resource>-->
-						<!--<resource>-->
-							<!--<directory>${project.build.directory}/minify</directory>-->
-						<!--</resource>-->
-					<!--</webResources>-->
-				<!--</configuration>-->
-			<!--</plugin>-->
+			<plugin>
+				<groupId>com.uas.plugins</groupId>
+				<artifactId>static-maven-plugin</artifactId>
+				<version>0.0.2-SNAPSHOT</version>
+				<!-- 静态资源分离 -->
+				<executions>
+					<execution>
+						<id>default-static</id>
+						<phase>prepare-package</phase>
+						<configuration>
+							<pathMatcher>static</pathMatcher>
+							<staticUrl>${static-path}</staticUrl>
+							<webappDir>${project.build.directory}/minify</webappDir>
+							<sourceDir>/</sourceDir>
+							<targetDir>${project.build.directory}/statics</targetDir>
+							<staticDir>/</staticDir>
+							<sourceIncludes>
+								<sourceInclude>resources/js/**/*.js</sourceInclude>
+								<sourceInclude>resources/data/**/*.json</sourceInclude>
+								<sourceInclude>resources/view/**/*.html</sourceInclude>
+								<sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
+							</sourceIncludes>
+							<!-- http://static.ubtoc.com/css/index.css?_v=1450321871828 -->
+							<versionSuffix>
+								<suffix>?_v=${timestamp}</suffix>
+								<exclude>*/require.js,*.min.js,*.min.css</exclude>
+							</versionSuffix>
+						</configuration>
+						<goals>
+							<goal>static</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.4</version>
+				<configuration>
+					<webResources>
+						<resource>
+							<directory>${project.build.directory}/statics</directory>
+						</resource>
+						<resource>
+							<directory>${project.build.directory}/minify</directory>
+						</resource>
+					</webResources>
+				</configuration>
+			</plugin>
 			<plugin>
 				<groupId>org.apache.tomcat.maven</groupId>
 				<artifactId>tomcat7-maven-plugin</artifactId>

+ 20 - 17
src/main/webapp/resources/js/admin/controllers/trade/InvoicefromOrderDetailCtrl.js

@@ -16,15 +16,14 @@ define([ 'app/app' ], function(app) {
 //					$scope.logisticsDetail = angular.fromJson($scope.logistics.companyName);
 					
 					//查看物流详情
-					$scope.listLogistics = function(data){
-						var lgtid = $scope.logistics.id;
+					$scope.listLogistics = function(){
 						var modalInstance = $modal.open({
 							animation: true,
 							templateUrl: 'static/view/admin/modal/listLogistics_modal.html',
 							controller: 'listLogisticsCtrl',
 							resolve: {
-								lgtid: function() {
-									return lgtid;
+								logistics : function () {
+									return $scope.logistics
 								}
 							}
 						});
@@ -86,22 +85,26 @@ define([ 'app/app' ], function(app) {
 		}]);
 	
 	// 物流信息
-	app.register.controller('listLogisticsCtrl', [
-			'$scope',
-			'$modal',
-			'ResponseLogistics',
-			'$modalInstance',
-			'lgtid',
-			function($scope, $modal, ResponseLogistics, $modalInstance,
-					lgtid) {
+	app.register.controller('listLogisticsCtrl', ['$scope', '$modal', 'ResponseLogistics', '$modalInstance', 'logistics', 'KdnLogistics', 'toaster', function($scope, $modal, ResponseLogistics, $modalInstance, logistics, KdnLogistics, toaster) {
 				$scope.Info = [];
 				$scope.getlogistics = function() {
-					ResponseLogistics.get({
-						id : lgtid
-					}, {}, function(data) {
-						$scope.Info = data;
-						console.log(data);
+					var params = {};
+					params.companyName = logistics.companyName;
+					params.logisticsCode = logistics.number;
+					KdnLogistics.kdnQuery(params, {}, function(response){
+						if(!response.errorInfo) {
+							$scope.Info = eval ("(" + response.traces + ")");
+						}
+					}, function(){
+						// $scope.Info = [];
+						toaster.pop('info', '查询物流信息失败,请核对物流公司和运单号');
 					});
+					// ResponseLogistics.get({
+					// 	id : lgtid
+					// }, {}, function(data) {
+					// 	$scope.Info = data;
+					// 	console.log(data);
+					// });
 				};
 				$scope.getlogistics();
 				$scope.cancel = function() {

+ 2 - 2
src/main/webapp/resources/js/admin/controllers/trade/InvoicefromPurcDetailCtrl.js

@@ -93,7 +93,7 @@ define([ 'app/app' ], function(app) {
 	
 
 				// 物流信息
-			app.register.controller('listLogisticsCtrl', ['$scope', '$modal', 'ResponseLogistics', '$modalInstance', 'logistics', 'KdnLogistics', function($scope, $modal, ResponseLogistics, $modalInstance, logistics, KdnLogistics) {
+			app.register.controller('listLogisticsCtrl', ['$scope', '$modal', 'ResponseLogistics', '$modalInstance', 'logistics', 'KdnLogistics', 'toaster', function($scope, $modal, ResponseLogistics, $modalInstance, logistics, KdnLogistics, toaster) {
 						$scope.Info = [];
 						$scope.getlogistics = function() {
 							var params = {};
@@ -105,7 +105,7 @@ define([ 'app/app' ], function(app) {
 									// statusOfLogistics($scope.logisticsInfo[$scope.logisticsInfo.length - 1].AcceptStation);
 								}
 							}, function(){
-								$scope.logisticsInfo = [];
+								// $scope.Info = [];
 								toaster.pop('info', '查询物流信息失败,请核对物流公司和运单号');
 							});
 							// ResponseLogistics.get({id : lgtid}, {}, function(data) {

+ 2 - 2
src/main/webapp/resources/js/admin/controllers/trade/TradePurchaseDetailCtrl.js

@@ -106,7 +106,7 @@ define([ 'app/app' ], function(app) {
 		loadData();
 	}]);
 	
-	app.register.controller('listLogisticsCtrl', [ '$scope', '$modal', 'ResponseLogistics', '$modalInstance', 'logistics', 'KdnLogistics', function($scope, $modal, ResponseLogistics, $modalInstance, logistics, KdnLogistics){
+	app.register.controller('listLogisticsCtrl', [ '$scope', '$modal', 'ResponseLogistics', '$modalInstance', 'logistics', 'KdnLogistics', 'toaster', function($scope, $modal, ResponseLogistics, $modalInstance, logistics, KdnLogistics, toaster){
 		$scope.Info = [];
 		$scope.getlogistics = function() {
 			var params = {};
@@ -118,7 +118,7 @@ define([ 'app/app' ], function(app) {
 					// statusOfLogistics($scope.logisticsInfo[$scope.logisticsInfo.length - 1].AcceptStation);
 				}
 			}, function(){
-				$scope.logisticsInfo = [];
+				// $scope.Info = [];
 				toaster.pop('info', '查询物流信息失败,请核对物流公司和运单号');
 			});
 			// ResponseLogistics.get({id : lgtid}, {}, function(data) {

+ 4 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/purchase_detail.js

@@ -209,6 +209,10 @@ define(['app/app'], function(app) {
 		}
 
 		$scope.updateTotal = function (data) {
+			if (data.currentTaxUnitPrice == null){
+				data.currentTaxUnitPrice = 0.000001;
+				return;
+			}
 			if (isNaN(data.currentTaxUnitPrice)){
 				data.currentTaxUnitPrice = 0.000001;
 				toaster.pop('warning', '提示', '输入的价格必须是数字');

+ 1 - 1
src/main/webapp/resources/view/admin/trade/trade_invoicefromorder_detail.html

@@ -105,7 +105,7 @@
 				<span>快递单号:</span>
 				<span ng-bind="logistics.number"></span>
 			</div>
-			<a  ng-click="listLogistics(logistics)" style="text-decoration : none ">点击查看物流详情</a>
+			<a  ng-click="listLogistics()" style="text-decoration : none ">点击查看物流详情</a>
 		</div>
 <!-- 
 		<div class="row-fluid">