Browse Source

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@328 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d

administrator 11 years ago
parent
commit
6918a02f72

+ 4 - 0
src/main/webapp/resources/css/index.css

@@ -47,6 +47,10 @@ a {
 .br-l {
 	border-left: 1px solid #e6e6e6;
 }
+
+.br-b {
+	border-bottom: 1px solid #e6e6e6;
+}
 /*inverse*/
 .text-default {
 	color: #56a022;

+ 4 - 4
src/main/webapp/resources/js/index/app.js

@@ -386,10 +386,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/PurcOrder',
 			return sum;
 		};
 		
-		$scope.onReplyClick = function(item) {
-			if(item.agreed) {
-				var reply = {id: item.id, agreed: item.agreed, replyRemark: item.replyRemark}; 
-				PurcChange.reply({changeId: item.id}, reply, function(){
+		$scope.onReplyClick = function(change) {
+			if(change.agreed) {
+				var reply = {id: change.id, agreed: Number(change.agreed), replyRemark: change.replyRemark};
+				PurcChange.reply({changeId: change.id}, reply, function(){
 					toaster.pop('info', '提示', '回复成功');
 					$scope.tableParams.reload();
 				}, function(response){

+ 1 - 1
src/main/webapp/resources/js/index/services/PurcOrder.js

@@ -15,7 +15,7 @@ define([ 'ngResource' ], function() {
 			}
 		});
 	}).factory('PurcChange', function($resource) {
-		return $resource('sale/changes/:id', {
+		return $resource('sale/changes/:id', {}, {
 			reply: {
 				url: 'sale/changes/:changeId/reply',
 				method: 'POST',

+ 51 - 28
src/main/webapp/resources/tpl/index/sale/change.html

@@ -129,10 +129,10 @@
 			<tr class="header">
 				<th>商品</th>
 				<th>单价</th>
-				<th width="100">数量</th>
-				<th width="120">交货日期</th>
-				<th width="180">变更内容</th>
-				<th width="60">操作</th>
+				<th>数量</th>
+				<th>交货日期</th>
+				<th width="150">变更内容</th>
+				<th width="70">操作</th>
 			</tr>
 			<tr class="sep-row">
 				<td colspan="6"></td>
@@ -159,7 +159,7 @@
 						</span> <span class="text-num text-bold" title="{{change.date}}"
 							ng-bind="change.date | date:'yyyy-MM-dd'"></span> <span>流水号:<a
 							class="text-num" ng-bind="change.code" href="#"></a></span> <span>订单:<a
-							class="text-num" ng-bind="change.order.code" href="#"></a></span>
+							class="text-num text-bold" ng-bind="change.order.code" href="#"></a></span>
 					</div>
 				</td>
 				<td colspan="3"><a href="#"
@@ -171,10 +171,39 @@
 				<td colspan="1" class="text-center">
 					<div class="operates">
 						<a href="#" class="text-muted" title="打印"><i
-							class="fa fa-print fa-lg"></i></a>
+							class="fa fa-print fa-lg fa-fw"></i></a> <a class="text-muted"
+							title="回复" ng-click="change.$editing=!change.$editing"><i
+							class="fa fa-share fa-lg fa-fw"></i></a>
 					</div>
 				</td>
 			</tr>
+			<tr ng-show="change.$editing" class="br-b">
+				<td colspan="3"></td>
+				<td>
+					<div style="margin: 0 auto" ng-init="change.agreed = 1">
+						<div class="form-group">
+							<label class="radio-inline"> <input type="radio"
+								ng-model="change.agreed" value="1"> 同意
+							</label> <label class="radio-inline"> <input type="radio"
+								ng-model="change.agreed" value="0"> 不同意
+							</label>
+						</div>
+					</div>
+				</td>
+				<td>
+					<div class="form-group">
+						<input type="text" ng-model="change.replyRemark"
+							class="form-control input-xs" placeholder="回复备注">
+					</div>
+				</td>
+				<td class="text-center"><br>
+					<div>
+						<a ng-click="change.$editing=!change.$editing">取消</a>
+					</div> <br>
+					<div>
+						<a ng-click="onReplyClick(change)" class="text-inverse">确认回复</a>
+					</div> <br></td>
+			</tr>
 			<tr class="order-bd" ng-repeat="item in change.orderChangeItems">
 				<td class="product">
 					<div class="text-num text-bold">
@@ -191,36 +220,30 @@
 						ng-class="{'text-inverse': item.newPrice != item.orderItem.price}"
 						title="{{item.newPrice}}" ng-bind="item.newPrice"></div>
 					<div ng-show="item.newPrice != item.orderItem.price">
-						<u class="text-muted" ng-bind="item.orderItem.price"></u>
+						<s class="text-num text-muted" ng-bind="item.orderItem.price"></s>
 					</div>
 				</td>
 				<td class="text-center">
-					<div class="text-num" title="{{item.qty}}" ng-bind="item.newQty"></div>
+					<div class="text-num"
+						ng-class="{'text-inverse': item.newQty != item.orderItem.qty}"
+						title="{{item.newQty}}" ng-bind="item.newQty"></div>
+					<div ng-show="item.newQty != item.orderItem.qty">
+						<s class="text-num text-muted" title="{{item.orderItem.qty}}"
+							ng-bind="item.orderItem.qty"></s>
+					</div>
 					<div class="text-muted" ng-bind="item.newProduct.unit"></div>
 				</td>
 				<td class="text-center br-l">
-					<div class="text-num" ng-bind="item.newDelivery"></div> <br>
-				</td>
-				<td class="text-center br-l">
-					<div ng-bind="item.description"></div>
-					<div style="margin: 0 auto" ng-show="item.$editing">
-						<input type="text" ng-model="item.replyRemark"
-							class="form-control input-xs" placeholder="回复备注">
+					<div class="text-num"
+						ng-class="{'text-inverse': item.newDelivery != item.orderItem.delivery}"
+						ng-bind="item.newDelivery | date:'yyyy-MM-dd'"></div>
+					<div ng-show="item.newDelivery != item.orderItem.delivery">
+						<s class="text-num text-muted"
+							ng-bind="item.orderItem.delivery | date:'yyyy-MM-dd'"></s>
 					</div>
 				</td>
-				<td class="text-center br-l">
-					<div ng-show="!item.$editing">
-						<a ng-click="item.$editing=!item.$editing">回复</a>
-					</div>
-					<div ng-show="item.$editing">
-						<div>
-							<a ng-click="item.$editing=!item.$editing">取消</a>
-						</div>
-						<br>
-						<div>
-							<a ng-click="onReplyClick(item)" class="text-inverse">确认回复</a>
-						</div>
-					</div>
+				<td class="text-center br-l" colspan="2">
+					<div ng-bind="item.description"></div>
 				</td>
 			</tr>
 		</tbody>