浏览代码

采购验收单详情

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9386 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 年之前
父节点
当前提交
23d1cc210b

+ 36 - 0
src/main/webapp/resources/js/index/app.js

@@ -347,10 +347,18 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             url : "/accept",
             templateUrl : "static/tpl/index/sale/accept.html",
             controller: 'SaleAcceptCtrl'
+        }).state('sale.accept_detail', {
+            url : "/accept/:id",
+            templateUrl : "static/tpl/index/sale/accept_detail.html",
+            controller: 'SaleAcceptDetailCtrl'
         }).state('sale.returns', {
             url : "/returns",
             templateUrl : "static/tpl/index/sale/returns.html",
             controller: 'SaleReturnsCtrl'
+        }).state('sale.return_detail', {
+            url : "/return/:id",
+            templateUrl : "static/tpl/index/sale/return_detail.html",
+            controller: 'SaleReturnsDetailCtrl'
         }).state('sale.sample', {
             url : "/sample",
             templateUrl : "static/tpl/index/sale/sample.html",
@@ -6501,6 +6509,20 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 		
 	}]);
 	
+	/**
+	 * 客户采购验收详情
+	 */
+	app.controller('SaleAcceptDetailCtrl', ['$scope', 'PurcAccept', 'toaster', 'BaseService', '$stateParams', function($scope, PurcAccept, toaster, BaseService, $stateParams){
+		BaseService.scrollBackToTop();
+		if($stateParams.id) {
+			PurcAccept.getDetail({id: $stateParams.id}, {}, function(data) {
+				$scope.accept= data;
+			}, function(response) {
+				toaster.pop('error', '提示', response.data);
+			});
+		}
+	}]);
+	
 	/**
 	 * 客户采购验退
 	 */
@@ -6582,6 +6604,20 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 		
 	}]);
 	
+	/**
+	 * 客户采购验退详情
+	 */
+	app.controller('SaleReturnsDetailCtrl', ['$scope', 'PurcReturn', 'toaster', 'BaseService', '$stateParams', function($scope, PurcReturn, toaster, BaseService, $stateParams){
+		BaseService.scrollBackToTop();
+		if($stateParams.id != null) {
+			PurcReturn.getDetail({id: $stateParams.id}, {}, function(data) {
+				$scope.returns = data;
+			}, function(response) {
+				toaster.pop('error', '提示', response.data);
+			});
+		}
+	}]);
+	
 	/**
 	 * 客户不良品入库
 	 */

+ 10 - 4
src/main/webapp/resources/js/index/services/Purc.js

@@ -468,16 +468,22 @@ define([ 'ngResource'], function() {
 		});
 	}]).factory('PurcAccept', ['$resource', function($resource) {
 		return $resource('sale/accept/:id', {}, {
-			getAll: {}
+			getAll: {},
+			getDetail : {
+				url: 'sale/accept/:id',
+				method: 'GET'
+			}
 		});
 	}]).factory('PurcReturn', ['$resource', function($resource) {
 		return $resource('sale/return/:id', {}, {
-			getAll: {
-				
-			},
+			getAll: {},
 			getEnterpriseName: {
 				url:"sale/return/:id/enname",
 				method: "GET"
+			},
+			getDetail : {
+				url: 'sale/return/:id',
+				method: 'GET'
 			}
 		});
 	}]).factory('PurcBadIn', ['$resource', function($resource) {

+ 1 - 1
src/main/webapp/resources/tpl/index/sale/accept.html

@@ -227,7 +227,7 @@
 							ng-bind="accept.date | date:'yyyy-MM-dd'"></span> <span
 							title="客户名称"
 							ng-bind="accept.enterprise.enName"></span>
-						<span>流水号:<span class="text-num" ng-bind="accept.code"></span></span>
+						<span>流水号:<a class="text-num" ng-bind="accept.code" ui-sref="sale.accept_detail({id: accept.id})"></a></span>
 						<span class="text-info" ng-if="accept.sendCode != null"
 							title="送货单号:{{::accept.sendCode}}"> 送货单号: <span
 							ng-bind="accept.sendCode" class="text-num"></span>

+ 120 - 0
src/main/webapp/resources/tpl/index/sale/accept_detail.html

@@ -0,0 +1,120 @@
+<style>
+	#order-detail-list .table-default tbody tr td{
+		vertical-align: top;
+	}
+	.pub-com_head span.fr {
+		margin-right: 20px;
+		color: #959595;
+		float: right;
+	}
+	.pub-com_head span.fr em {
+		margin-right: 50px;
+		font-size: 14px;
+		font-style: inherit;
+	}
+</style>
+<div class="pane base-info" id="order-detail-list">
+	<div class="pub-com_head">
+		<span>客户采购验收单</span>
+		<span class="fr"><em>操作员:{{accept.recorder}}</em><time>日期:{{accept.date | date:'yyyy-MM-dd'}}</time></span>
+	</div>
+	<div class="pane-body">
+		<div class="title-div" style="border-bottom: 1px dashed #327ebe;">
+			<span class="f14">单据信息</span>
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-3">
+				<span class="title">验收单号:</span>
+				<div class="content" ng-bind="::accept.code"></div>
+			</div>
+			<div class="col-xs-6">
+				<span class="title">客户:</span>
+				<div class="content" ng-bind="::accept.enterprise.enName"></div>
+			</div>
+			<div class="col-xs-3">
+				<span class="title">验收日期:</span>
+				<div class="content" ng-bind="::accept.date | date:'yyyy-MM-dd'"></div>
+			</div>
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-12">
+				<div class="title">应付供应商:</div>
+				<div class="unchanged-info">{{accept.receivename}}</div>
+			</div>
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-6">
+				<div class="title">送货单号:</div>
+				<div class="unchanged-info">{{accept.sendCode}}</div>
+			</div>
+			<div class="col-xs-6">
+				<span class="title">付款方式:</span>
+				<div class="content" ng-bind="::accept.payments"></div>
+			</div>
+		</div>
+		<div class="row row-sm item">
+			<div class="col-xs-6">
+				<div class="title">币别:</div>
+				<div class="unchanged-info">{{accept.currency}}</div>
+			</div>
+			<div class="col-xs-6">
+				<span class="title">备注:</span>
+				<div class="content" ng-bind="::inquiry.remark"></div>
+			</div>
+		</div>
+		<div class="title-div" style="border-bottom: 1px dashed #327ebe;">
+			<span class="f14">产品价格详情</span>&nbsp;
+		</div>
+		<div class="block">
+			<table class="block table table-default table-striped" style=" margin-bottom: 0">
+				<thead>
+					<tr class="header">
+						<th width="60">序号</th>
+						<th width="260">采购单号</th>
+						<th width="90">产品名称</th>
+						<th width="100">品牌</th>
+						<th width="50">单位</th>
+						<th width="60">单价</th>
+						<th width="80">入库数</th>
+						<th width="80">金额</th>
+						<th width="120">批号</th>
+					</tr>
+				</thead>
+			</table>
+			<table class="block table table-default table-striped">
+				<tbody>
+					<tr
+						ng-repeat="acceptitem in accept.acceptItems | orderBy:'number'" ng-class="{'scoroll':order.orderItems.length>10}">
+						<td width="40">
+							<div ng-bind="::acceptitem.number">
+							</div>
+						</td>
+						<td width="270">
+							<div ng-bind="::acceptitem.orderItem.order.code"></div>
+						</td>
+						<td class="text-center" width="90">
+							<div ng-bind="::acceptitem.orderItem.product.title"></div>
+						</td>
+						<td class="text-center" width="100">
+							<div ng-bind="::acceptitem.orderItem.product.brand"></div>
+						</td>
+						<td class="text-center" width="50">
+							<div ng-bind="::acceptitem.orderItem.product.unit"></div>
+						</td>
+						<td class="text-center" width="60">
+							<div ng-bind="::acceptitem.orderItem.price"></div>
+						<td class="text-center" width="80">
+							<div ng-bind="::acceptitem.orderItem.acceptQty"></div>
+						</td>
+						<td class="text-center" width="80">
+							<div>{{acceptitem.orderItem.acceptQty*acceptitem.orderItem.price | number: 6}}</div>
+						</td>
+						<td class="text-center" width="120">
+							<div ng-bind="::acceptitem.batchCode"></div>
+						</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
+	</div>
+</div>