Browse Source

发货随机号,批量发货物料号字段

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@989 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
suntg 11 years ago
parent
commit
cf289e98a9
1 changed files with 13 additions and 1 deletions
  1. 13 1
      src/main/webapp/resources/js/index/app.js

+ 13 - 1
src/main/webapp/resources/js/index/app.js

@@ -1063,7 +1063,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			page : 1, 
 			count : 5,
 			sorting: {
-                'date': 'desc'
+                'delivery': 'asc',
+                'orderItemOrderCode': 'asc',
+                'orderItemNumber': 'asc'
             }
 		}, {
 			total : 0, 
@@ -1091,6 +1093,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		    item[openParam] = !item[openParam];
 		};
 		
+		$scope.autoCode = function(notice){
+			var date = new Date();
+			var yy = ('' + date.getFullYear()).substr(2,2);
+			var mm = (date.getMonth() > 8) ? '' + (date.getMonth() + 1) : '0' + (date.getMonth() + 1);
+			var dd = (date.getDate() > 9) ? '' + date.getDate() : '0' + date.getDate();
+			var code = '' + yy + mm + dd + date.getHours() 
+				+ date.getMinutes() + date.getSeconds() + '-' + date.getMilliseconds();
+			notice.send.code = code;
+		};
+		
 		$scope.onReplyClick = function(notice) {
 			if(!notice.send || !notice.send.qty || notice.send.qty > notice.qty - (notice.endQty || 0)) {
 				toaster.pop('warning', '警告', '数量填写错误!');