Kaynağa Gözat

解决订单拆单前订单备注错误的问题

hulh 8 yıl önce
ebeveyn
işleme
48b306dff7

+ 5 - 1
src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderServiceImpl.java

@@ -84,6 +84,7 @@ import com.uas.search.model.BaseOrder;
 import com.uas.search.model.PageParams;
 import com.uas.search.model.PageParams;
 import com.uas.search.model.SPage;
 import com.uas.search.model.SPage;
 import com.uas.search.service.OrderSearchService;
 import com.uas.search.service.OrderSearchService;
+import org.apache.commons.collections.map.HashedMap;
 import org.apache.commons.lang.time.DateUtils;
 import org.apache.commons.lang.time.DateUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -753,7 +754,10 @@ public class OrderServiceImpl implements OrderService {
             or.setTransationPrice(NumberUtil.fractionNumCeil(transationPrice, 2));
             or.setTransationPrice(NumberUtil.fractionNumCeil(transationPrice, 2));
             or.setCmpQty(uuids.size());
             or.setCmpQty(uuids.size());
             or.setQty(qty);
             or.setQty(qty);
-            or.setOrderRemark(remarkMap.getString(storeid));
+            Map<String, String> map = new HashedMap();
+            map.put(storeid, remarkMap.getString(storeid));
+            String orRemark = FastjsonUtils.toJson(map);
+            or.setOrderRemark(orRemark);
 
 
             StoreIn storeIn = storeInDao.findByUuid(storeid);
             StoreIn storeIn = storeInDao.findByUuid(storeid);
             if (storeIn == null) {
             if (storeIn == null) {

+ 2 - 1
src/main/java/com/uas/platform/b2c/trade/order/service/impl/PurchaseServiceImpl.java

@@ -384,7 +384,8 @@ public class PurchaseServiceImpl implements PurchaseService {
 
 
 		Purchase purchase = new Purchase();
 		Purchase purchase = new Purchase();
 		purchase.setCurrency(crName);
 		purchase.setCurrency(crName);
-		purchase.setPurchaseRemark(orderFromCust.getOrderRemark());//绑定评论
+		JSONObject object = FastjsonUtils.fromJson(orderFromCust.getOrderRemark(), JSONObject.class);
+		purchase.setPurchaseRemark(object.getString(orderFromCust.getStoreid()));//绑定评论
 		purchase.setSellerenuu(enuu);
 		purchase.setSellerenuu(enuu);
 		purchase.setStoreid(orderFromCust.getStoreid());
 		purchase.setStoreid(orderFromCust.getStoreid());
 		//如果是优软代售的。
 		//如果是优软代售的。

+ 8 - 2
src/main/webapp/resources/js/usercenter/controllers/forstore/order_pay_ctrl.js

@@ -41,6 +41,11 @@ define(['app/app'], function(app) {
             });
             });
         };
         };
 
 
+        $scope.deliveryMethod = {
+			1301 : '第三方配送',
+			1302 : '卖家配送',
+			1303 : '上门自提'
+		};
 
 
         //选择相应的发票信息
         //选择相应的发票信息
 		$scope.selectBill = function(kind) {
 		$scope.selectBill = function(kind) {
@@ -109,7 +114,9 @@ define(['app/app'], function(app) {
 				} else {
 				} else {
 					$scope.order = response;
 					$scope.order = response;
 					$scope.$$orderDetailsMap = {};
 					$scope.$$orderDetailsMap = {};
-					$scope.remarkList = {};
+					if ($scope.order.orderRemark){
+						$scope.remarkList = angular.fromJson($scope.order.orderRemark);
+					}
 					if($scope.order.orderDetails.length == 0) {
 					if($scope.order.orderDetails.length == 0) {
 						$state.go('buyer_order');
 						$state.go('buyer_order');
 					}
 					}
@@ -118,7 +125,6 @@ define(['app/app'], function(app) {
 							$scope.$$orderDetailsMap[detail.storeName].push(detail);
 							$scope.$$orderDetailsMap[detail.storeName].push(detail);
 						}else {
 						}else {
 							$scope.$$orderDetailsMap[detail.storeName] = [];
 							$scope.$$orderDetailsMap[detail.storeName] = [];
-							$scope.remarkList[detail.storeid] = "";
 							$scope.$$orderDetailsMap[detail.storeName].push(detail);
 							$scope.$$orderDetailsMap[detail.storeName].push(detail);
 						}
 						}
 					});
 					});

+ 4 - 3
src/main/webapp/resources/view/usercenter/forstore/order_pay.html

@@ -514,18 +514,19 @@
 						<dd class="oder-remark">
 						<dd class="oder-remark">
 							<span style="width: 100%">
 							<span style="width: 100%">
 								<em>订单备注:</em>
 								<em>订单备注:</em>
-								<input type="text"  class="form-control" placeholder="请填写订单备注" ng-model="remarkList[details[0].storeid]" maxlength="200"/>
+								<input ng-if="order.status==501" type="text"  class="form-control" placeholder="请填写订单备注" ng-model="remarkList[details[0].storeid]" maxlength="200"/>
+								<em ng-if="order.status!=501" ng-bind="remarkList[details[0].storeid] || '无'" style="margin-left: 0;"></em>
 							</span>
 							</span>
 						</dd>
 						</dd>
 						<dd class="line60">
 						<dd class="line60">
-							<span class="style01" style="width: 60%;">配送方式:
+							<span class="style01" style="width: 60%; line-height: 40px;">配送方式:
 								<select ng-if="order.status == 501" class="select" ng-switch="order.deliverytype" style="opacity: 1;" >
 								<select ng-if="order.status == 501" class="select" ng-switch="order.deliverytype" style="opacity: 1;" >
 									<option ng-switch-when="1301">第三方配送</option>
 									<option ng-switch-when="1301">第三方配送</option>
 									<!--<option ng-switch-when="1301">卖家配送</option>-->
 									<!--<option ng-switch-when="1301">卖家配送</option>-->
 									<!--<option ng-switch-when="1301">上门自提</option>-->
 									<!--<option ng-switch-when="1301">上门自提</option>-->
 									<!--<option ng-switch-when="1302">上门自提</option>-->
 									<!--<option ng-switch-when="1302">上门自提</option>-->
 								</select>
 								</select>
-								<em ng-if="order.status != 501">物流配送</em>
+								<em ng-if="order.status != 501" ng-bind="deliveryMethod[order.deliverytype]" style="color: #333;">物流配送</em>
 								<!--<i>满1000元包邮,未满足的订单收取运费20元</i>-->
 								<!--<i>满1000元包邮,未满足的订单收取运费20元</i>-->
 							</span>
 							</span>
 								<span class="total-price">
 								<span class="total-price">