Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/release-201827-wangcz' into release-201827-wangcz

yujia 7 rokov pred
rodič
commit
978fd18f76
21 zmenil súbory, kde vykonal 506 pridanie a 75 odobranie
  1. 51 0
      src/main/java/com/uas/platform/b2c/common/lottery/controller/LotteryController.java
  2. 18 0
      src/main/java/com/uas/platform/b2c/common/lottery/service/ActivityItemService.java
  3. 19 0
      src/main/java/com/uas/platform/b2c/common/lottery/service/UserInfoService.java
  4. 53 0
      src/main/java/com/uas/platform/b2c/common/lottery/service/impl/ActivityItemServiceImpl.java
  5. 53 0
      src/main/java/com/uas/platform/b2c/common/lottery/service/impl/UserInfoServiceImpl.java
  6. 14 0
      src/main/java/com/uas/platform/b2c/core/config/SysConf.java
  7. 24 1
      src/main/java/com/uas/platform/b2c/trade/seek/service/impl/SeekPurchaseBomServiceImpl.java
  8. 3 0
      src/main/resources/dev/sys.properties
  9. 4 1
      src/main/resources/prod/sys.properties
  10. 4 1
      src/main/resources/test/sys.properties
  11. 28 1
      src/main/webapp/resources/js/usercenter/controllers/forstore/order_detail_ctrl.js
  12. 64 20
      src/main/webapp/resources/js/usercenter/controllers/forstore/query_logistics_ctrl.js
  13. 12 4
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js
  14. 72 23
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_storageCtrl.js
  15. 1 1
      src/main/webapp/resources/view/usercenter/forstore/buyer_order.html
  16. 18 3
      src/main/webapp/resources/view/usercenter/forstore/order_detail.html
  17. 48 0
      src/main/webapp/resources/view/usercenter/forstore/query_logistics.html
  18. 2 2
      src/main/webapp/resources/view/vendor/forstore/vendor_delivery.html
  19. 3 2
      src/main/webapp/resources/view/vendor/forstore/vendor_material.html
  20. 1 1
      src/main/webapp/resources/view/vendor/forstore/vendor_order.html
  21. 14 15
      src/main/webapp/resources/view/vendor/forstore/vendor_storage.html

+ 51 - 0
src/main/java/com/uas/platform/b2c/common/lottery/controller/LotteryController.java

@@ -0,0 +1,51 @@
+package com.uas.platform.b2c.common.lottery.controller;
+
+import com.uas.platform.b2c.common.lottery.service.ActivityItemService;
+import com.uas.platform.b2c.common.lottery.service.UserInfoService;
+import com.uas.platform.b2c.trade.support.ResultMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 推广抽奖活动接口
+ * Created by wangyc on 2018/9/12.
+ *
+ * @version 2018/9/12 10:25 wangyc
+ */
+@RestController
+@RequestMapping(value = "/lottery")
+public class LotteryController {
+
+    private final UserInfoService userInfoService;
+
+    private final ActivityItemService activityItemService;
+
+    @Autowired
+    public LotteryController(UserInfoService userInfoService, ActivityItemService activityItemService) {
+        this.userInfoService = userInfoService;
+        this.activityItemService = activityItemService;
+    }
+
+    /**
+     * 获取单个用户信息
+     * @param activityCode 活动编号
+     * @return
+     */
+    @RequestMapping(value = "/userInfo", method = RequestMethod.GET, produces = "application/json")
+    public ResultMap findUserInfo(String activityCode) {
+        return userInfoService.findUserInfo(activityCode);
+    }
+
+    /**
+     * 获取当前等级信息、下一等级信息
+     * @param activityCode 活动编号
+     * @return
+     */
+    @RequestMapping(value = "/user/activityItems", method = RequestMethod.GET, produces = "application/json")
+    public ResultMap getActivityItems(String activityCode) {
+        return activityItemService.getActivityItems(activityCode);
+    }
+
+}

+ 18 - 0
src/main/java/com/uas/platform/b2c/common/lottery/service/ActivityItemService.java

@@ -0,0 +1,18 @@
+package com.uas.platform.b2c.common.lottery.service;
+
+import com.uas.platform.b2c.trade.support.ResultMap;
+
+/**
+ * Created by wangyc on 2018/9/12.
+ *
+ * @version 2018/9/12 14:47 wangyc
+ */
+public interface ActivityItemService {
+
+    /**
+     * 获取当前等级信息、下一等级信息
+     * @param activityCode 活动编号
+     * @return
+     */
+    ResultMap getActivityItems(String activityCode);
+}

+ 19 - 0
src/main/java/com/uas/platform/b2c/common/lottery/service/UserInfoService.java

@@ -0,0 +1,19 @@
+package com.uas.platform.b2c.common.lottery.service;
+
+import com.uas.platform.b2c.trade.support.ResultMap;
+
+/**
+ * Created by wangyc on 2018/9/12.
+ *
+ * @version 2018/9/12 10:28 wangyc
+ */
+public interface UserInfoService {
+
+    /**
+     * 获取单个用户信息
+     * @param activityCode 活动编号
+     * @return
+     */
+    ResultMap findUserInfo(String activityCode);
+
+}

+ 53 - 0
src/main/java/com/uas/platform/b2c/common/lottery/service/impl/ActivityItemServiceImpl.java

@@ -0,0 +1,53 @@
+package com.uas.platform.b2c.common.lottery.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.uas.platform.b2c.common.lottery.service.ActivityItemService;
+import com.uas.platform.b2c.core.config.SysConf;
+import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.trade.support.CodeType;
+import com.uas.platform.b2c.trade.support.ResultMap;
+import com.uas.platform.core.util.HttpUtil;
+import com.uas.platform.core.util.HttpUtil.Response;
+import java.util.HashMap;
+import java.util.Map;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+/**
+ * Created by wangyc on 2018/9/12.
+ *
+ * @version 2018/9/12 14:47 wangyc
+ */
+@Service
+public class ActivityItemServiceImpl implements ActivityItemService {
+
+    // 获取单个用户信息路径
+    private static final String GET_USER_URL = "/activityItem/user";
+
+    private final SysConf sysConf;
+
+    @Autowired
+    public ActivityItemServiceImpl(SysConf sysConf) {
+        this.sysConf = sysConf;
+    }
+
+    @Override
+    public ResultMap getActivityItems(String activityCode) {
+        if (StringUtils.isEmpty(activityCode)) {
+            return new ResultMap(CodeType.PARAMETER_ERROR, "活动信息不完全,请确认活动信息");
+        }
+
+        Map<String, Object> params = new HashMap<>();
+        params.put("useruu", SystemSession.getUser().getUserUU());
+        params.put("enuu", SystemSession.getUser().getEnterprise() == null ? 0 : SystemSession.getUser().getEnterprise().getUu());
+        params.put("activityCode", activityCode);
+
+        try {
+            Response response = HttpUtil.sendGetRequest(sysConf.getLottery() + GET_USER_URL, params);
+            return JSON.parseObject(response.getResponseText(), ResultMap.class);
+        } catch (Exception e) {
+            return new ResultMap(CodeType.ERROR_STATE, "获取等级信息错误,请重试");
+        }
+    }
+}

+ 53 - 0
src/main/java/com/uas/platform/b2c/common/lottery/service/impl/UserInfoServiceImpl.java

@@ -0,0 +1,53 @@
+package com.uas.platform.b2c.common.lottery.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.uas.platform.b2c.common.lottery.service.UserInfoService;
+import com.uas.platform.b2c.core.config.SysConf;
+import com.uas.platform.b2c.core.support.SystemSession;
+import com.uas.platform.b2c.trade.support.CodeType;
+import com.uas.platform.b2c.trade.support.ResultMap;
+import com.uas.platform.core.util.HttpUtil;
+import com.uas.platform.core.util.HttpUtil.Response;
+import java.util.HashMap;
+import java.util.Map;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+/**
+ * Created by wangyc on 2018/9/12.
+ *
+ * @version 2018/9/12 10:30 wangyc
+ */
+@Service
+public class UserInfoServiceImpl implements UserInfoService {
+
+    // 获取单个用户信息路径
+    private static final String GET_USER_URL = "/users/user";
+
+    private final SysConf sysConf;
+
+    @Autowired
+    public UserInfoServiceImpl(SysConf sysConf) {
+        this.sysConf = sysConf;
+    }
+
+    @Override
+    public ResultMap findUserInfo(String activityCode) {
+        if (StringUtils.isEmpty(activityCode)) {
+            return new ResultMap(CodeType.PARAMETER_ERROR, "活动信息不完全,请确认活动信息");
+        }
+
+        Map<String, Object> params = new HashMap<>();
+        params.put("useruu", SystemSession.getUser().getUserUU());
+        params.put("enuu", SystemSession.getUser().getEnterprise() == null ? 0 : SystemSession.getUser().getEnterprise().getUu());
+        params.put("activityCode", activityCode);
+
+        try {
+            Response response = HttpUtil.sendGetRequest(sysConf.getLottery() + GET_USER_URL, params);
+            return JSON.parseObject(response.getResponseText(), ResultMap.class);
+        } catch (Exception e) {
+            return new ResultMap(CodeType.ERROR_STATE, "获取用户信息错误,请重试");
+        }
+    }
+}

+ 14 - 0
src/main/java/com/uas/platform/b2c/core/config/SysConf.java

@@ -175,6 +175,12 @@ public class SysConf {
 	@Value(("#{sys.profile}"))
 	private String profile;
 
+	/**
+	 * 推广抽奖活动地址
+	 */
+	@Value(("#{sys.lottery}"))
+	private String lottery;
+
 	/**
 	 * 物料id
 	 */
@@ -394,6 +400,14 @@ public class SysConf {
 		return this;
 	}
 
+	public String getLottery() {
+		return lottery;
+	}
+
+	public void setLottery(String lottery) {
+		this.lottery = lottery;
+	}
+
 	public String getProductServiceIp() {
 		return productServiceIp;
 	}

+ 24 - 1
src/main/java/com/uas/platform/b2c/trade/seek/service/impl/SeekPurchaseBomServiceImpl.java

@@ -685,15 +685,38 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
             return map;
         }
         try {
+            Date now = new Date();
+            List<Product> products = new ArrayList<>();
+            Integer newAmount = 0;
             List<SeekPurchaseByBatch> seekPurchaseByBatches = bom.getSeekPurchaseByBatchs();
             if (!CollectionUtils.isEmpty(seekPurchaseByBatches)) {
                 for (SeekPurchaseByBatch batch : seekPurchaseByBatches) {
+                    if (null == batch.getId()) {
+                        newAmount++;
+                    }
                     if (null == batch.getAmount()) {
                         batch.setAmount(1d);
                     }
+                    batch.setReleaseDate(now);
+                    Product product = new Product();
+                    if (CollectionUtils.isEmpty(productDao.findProductByPcmpcodeAndPbrandenAndEnUU(batch.getCode(), batch.getBrand(), SystemSession.getUser().getEnterprise().getUu()))){
+                        product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
+                        product.setUserUU(SystemSession.getUser().getUserUU());
+                        product.setProdNum(System.currentTimeMillis() + StringUtilB2C.getRandomNumber(5));
+                        product.setBrand(batch.getBrand());
+                        product.setCmpCode(batch.getCode());
+                        product.setPbranden(batch.getBrand());
+                        product.setPcmpcode(batch.getCode());
+                        product.setSpec(batch.getSpec());
+                        product.setProdName(batch.getKind());
+                        product.setKind(batch.getKind());
+                        products.add(product);
+                    }
                 }
                 seekPurchaseByBatchDao.save(seekPurchaseByBatches);
+                productDao.save(products);
             }
+            bom.setAmount(bom.getAmount() + newAmount);
             seekPurchaseBomDao.save(bom);
             map.put("success", true);
         } catch (Exception e) {
@@ -905,7 +928,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
                 newProduct.setReleaseDate(now);
                 //如果该物料在物料表中不存在,则将新增物料添加到物料表中
                 Product product = new Product();
-                if (!CollectionUtils.isEmpty(productDao.findProductByPcmpcodeAndPbrandenAndEnUU(newProduct.getCode(), newProduct.getBrand(), SystemSession.getUser().getEnterprise().getUu()))){
+                if (CollectionUtils.isEmpty(productDao.findProductByPcmpcodeAndPbrandenAndEnUU(newProduct.getCode(), newProduct.getBrand(), SystemSession.getUser().getEnterprise().getUu()))){
                     product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
                     product.setUserUU(SystemSession.getUser().getUserUU());
                     product.setProdNum(System.currentTimeMillis() + StringUtilB2C.getRandomNumber(5));

+ 3 - 0
src/main/resources/dev/sys.properties

@@ -55,3 +55,6 @@ messageServiceUrl=http://192.168.253.12:24000/message/
 #b2b
 b2b=http://218.17.158.219/b2b_test
 b2bDomain=218.17.158.219:9000/b2b_test
+
+#lottery
+lottery=http://10.1.51.79:20000

+ 4 - 1
src/main/resources/prod/sys.properties

@@ -57,4 +57,7 @@ messageServiceUrl=http://api-message.ubtob.com/
 #b2b
 b2b=http://uas.ubtob.com
 b2bDomain=uas.ubtob.com
-b2bInner=http://10.10.100.103:8080
+b2bInner=http://10.10.100.103:8080
+
+#lottery
+lottery=http://10.1.51.79:20000

+ 4 - 1
src/main/resources/test/sys.properties

@@ -55,4 +55,7 @@ messageServiceUrl=http://192.168.253.12:24000/message/
 
 #b2b
 b2b=http://218.17.158.219/b2b_test
-b2bDomain=218.17.158.219:9000/b2b_test
+b2bDomain=218.17.158.219:9000/b2b_test
+
+#lottery
+lottery=http://10.1.51.79:20000

+ 28 - 1
src/main/webapp/resources/js/usercenter/controllers/forstore/order_detail_ctrl.js

@@ -16,6 +16,7 @@ define(['app/app'], function(app) {
       Order.getSendOrderInfo(
           {id: $scope.order.id, invoiceid: $scope.ChooseItem}, {},
           function (data) {
+            var params = {};
           	if (data.data.status === 404) {
               $scope.orderStatus = true
 	          } else {
@@ -24,6 +25,8 @@ define(['app/app'], function(app) {
             var _data = data.data.invoiceDetails
             var _details = $scope.order.orderDetails
 	          $scope.order.logistics = data.data.logistics
+            $scope.logistics = data.data.logistics
+
             for (var j = 0; j < _data.length; j++) {
               for (var k = 0; k < _details.length; k++) {
                 if (_data[j].orderDetailId === _details[k].id) {
@@ -31,6 +34,28 @@ define(['app/app'], function(app) {
                 }
               }
             }
+            params.companyName = $scope.logistics.companyName;
+            KdnLogistics.kdnQueryCompany({companyName:$scope.logistics.companyName}, function(response){
+              console.log(response);
+              if (response.code){
+                $scope.canShowInfo = true;
+              }else{
+                $scope.canShowInfo = false;
+              }
+            },function (ex) {
+              $scope.canShowInfo = false;
+            });
+            params.logisticsCode = $scope.logistics.number;
+            KdnLogistics.kdnQuery(params, {}, function(response){
+              if(!response.errorInfo) {
+                $scope.logisticsInfo = eval ("(" + response.traces + ")");
+                if($scope.logisticsInfo.length != 0) {
+                  $scope.hasInfo = true;
+                }
+              }
+            }, function(err){
+              toaster.pop('info', err.data);
+            });
           })
     }
     // 记录状态激活信息
@@ -278,7 +303,9 @@ define(['app/app'], function(app) {
 		}
 
 		// 设置当前选择的发货单
-		$scope.ChooseSendGoodsItem = function(item, ind) {
+		$scope.ChooseSendGoodsItem = function(item, ind, e) {
+			e.stopPropagation()
+			e.preventDefault()
 		  $scope.CheckId = 'autoMonth' + ind;
 		  $scope.ChooseItem = item;
 		  getReceiveInfo();

+ 64 - 20
src/main/webapp/resources/js/usercenter/controllers/forstore/query_logistics_ctrl.js

@@ -14,6 +14,46 @@ define(['app/app', 'calendar'], function(app) {
             1302 : '卖家配送',
             1303 : '上门自提'
         };
+      // 设置当前选择的发货单
+      $scope.ChooseSendGoodsItem = function(item, ind, e) {
+        e.stopPropagation()
+        e.preventDefault()
+        $scope.CheckId = 'autoMonth' + ind;
+        $scope.ChooseItem = item;
+        getReceiveInfo();
+      }
+      // 获取当前收货单所对应的物品信息
+      function getReceiveInfo() {
+        Order.getSendOrderInfo(
+            {id: $scope.order.id, invoiceid: $scope.ChooseItem}, {},
+            function (data) {
+              var params = {};
+              $scope.order.logistics = data.data.logistics
+              $scope.logistics = data.data.logistics
+              params.companyName = $scope.logistics.companyName;
+              KdnLogistics.kdnQueryCompany({companyName:$scope.logistics.companyName}, function(response){
+                console.log(response);
+                if (response.code){
+                  $scope.canShowInfo = true;
+                }else{
+                  $scope.canShowInfo = false;
+                }
+              },function (ex) {
+                $scope.canShowInfo = false;
+              });
+              params.logisticsCode = $scope.logistics.number;
+              KdnLogistics.kdnQuery(params, {}, function(response){
+                if(!response.errorInfo) {
+                  $scope.logisticsInfo = eval ("(" + response.traces + ")");
+                  if($scope.logisticsInfo.length != 0) {
+                    $scope.hasInfo = true;
+                  }
+                }
+              }, function(err){
+                toaster.pop('info', err.data);
+              });
+            })
+      }
 
         /**
          *  查询物流信息(接口需要真实运单号)
@@ -34,31 +74,35 @@ define(['app/app', 'calendar'], function(app) {
                 }
                 $scope.order = data[0];
                 $scope.address = JSON.parse($scope.order.jsonAddress);
+                $scope.sendGoodsList = $scope.order.inIds.split(',')
+                  $scope.CheckId = 'autoMonth0';
+                  $scope.ChooseItem = $scope.sendGoodsList[0];
+                    getReceiveInfo()
                 if (!data[0].lgtId) {
                     getOrderStatus($scope.order.status);
                     $scope.logisticsInfo = [];
                     return;
                 }
-                Logistics.findLogisticsById({lgtid: data[0].lgtId}, function(data){
-                    $scope.logistics = data;
-                    var params = {};
-                    params.companyName = $scope.logistics.companyName;
-                    params.logisticsCode = $scope.logistics.number;
-                    KdnLogistics.kdnQuery(params, {}, function(response){
-                        if(!response.errorInfo) {
-                            $scope.logisticsInfo = eval ("(" + response.traces + ")");
-                            statusOfLogistics($scope.logisticsInfo[$scope.logisticsInfo.length - 1].AcceptStation);
-                            $scope.hasInfo = true;
-                        } else {
-                            $scope.logisticsInfo = [];
-                        }
-                    }, function(err){
-                        $scope.logisticsInfo = [];
-                        toaster.pop('info', err.data || '查询物流信息失败,请核对物流公司和运单号');
-                    });
-                }, function(err){
-                    toaster.pop('info', err.data || '根据快递ID查询跟订单相关联的物流信息失败');
-                });
+                // Logistics.findLogisticsById({lgtid: data[0].lgtId}, function(data){
+                //     $scope.logistics = data;
+                //     var params = {};
+                //     params.companyName = $scope.logistics.companyName;
+                //     params.logisticsCode = $scope.logistics.number;
+                //     KdnLogistics.kdnQuery(params, {}, function(response){
+                //         if(!response.errorInfo) {
+                //             $scope.logisticsInfo = eval ("(" + response.traces + ")");
+                //             statusOfLogistics($scope.logisticsInfo[$scope.logisticsInfo.length - 1].AcceptStation);
+                //             $scope.hasInfo = true;
+                //         } else {
+                //             $scope.logisticsInfo = [];
+                //         }
+                //     }, function(err){
+                //         $scope.logisticsInfo = [];
+                //         toaster.pop('info', err.data || '查询物流信息失败,请核对物流公司和运单号');
+                //     });
+                // }, function(err){
+                //     toaster.pop('info', err.data || '根据快递ID查询跟订单相关联的物流信息失败');
+                // });
             }, function(err) {
                 toaster.pop('warning', err.data || '获取订单信息失败。');
             });

+ 12 - 4
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -3694,7 +3694,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       $scope.Regul.id = ChooseItem.id
       $scope.Regul.RegulImg = ChooseItem.cmpImg || 'static/img/vendor/images/upload.png' // 物料图片
       $scope.Regul.packaging = ChooseItem.packaging || '其他' // 包装信息
-      $scope.Regul.minPackQty = ChooseItem.minPackQty >= 0 ?  ChooseItem.minPackQty : ChooseItem.goods.minBuyQty // 最小包装数
+      $scope.Regul.minPackQty = ChooseItem.minPackQty && (ChooseItem.minPackQty >= 0 ?  ChooseItem.minPackQty : ChooseItem.goods.minBuyQty) || 1 // 最小包装数
       $scope.Regul.minPackQty = $scope.Regul.minPackQty > 0 ? $scope.Regul.minPackQty : 1
     }
     // 编辑物料保存
@@ -3763,12 +3763,13 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     $scope.productUpOff = {}
     // 编辑上下架
     $scope.dateArea = 'formMe';
+    var _item = null
     $scope.editProductUpOff = function(commodity, index) {
-      if (commodity.erpReserve === '' ||  commodity.minPackQty === 0) {
+      if (commodity.erpReserve === '' ||  commodity.erpReserve === 0 || !commodity.erpReserve) {
         toaster.pop('warning','提示','当前物料库存为0,请先入库')
         return;
       }
-      if (commodity.minPackQty === 0  || commodity.minPackQty === '') {
+      if (commodity.minPackQty === 0  || commodity.minPackQty === '' || !commodity.minPackQty) {
         toaster.pop('warning','提示','请先编辑物料,最小包装数选项')
         return;
       }
@@ -3787,9 +3788,12 @@ define(['app/app', 'jquery-uploadify'], function(app) {
           minBuyQty: $scope.productUpOff.minPackQty || 1,
           prices: [{'start': $scope.productUpOff.minPackQty || 1, rMBPrice: ''}],
         }
+
         // $scope.productAddFragment($scope.productUpOff.goods.prices)
       }
-      $scope.productUpOff.goods.prices[0].start = $scope.productUpOff.minPackQty || 1
+      _item = $scope.productUpOff.goods.prices[0].start
+      // $scope.productUpOff.goods.prices[0].start = $scope.productUpOff.minPackQty || 1
+
       $scope.productUpOff.goods.selfSale = ($scope.storeInfo.uuid != 'undefind' && $scope.productUpOff.goods.storeid == $scope.storeInfo.uuid && $scope.storeInfo.storeName.indexOf('优软测试二') < 0 && $scope.storeInfo.storeName.indexOf('优软商城') < 0) ? 1: 0
       // $scope.productUpOff.dateArea = $scope.productUpOff.goods.selfSale === 1 ? 'formMe' : 'autoMonth' // 自营还是销售
       commodity.dateArea = $scope.productUpOff.goods.selfSale === 1 ? 'formMe' : 'autoMonth' // 自营还是销售
@@ -3801,6 +3805,10 @@ define(['app/app', 'jquery-uploadify'], function(app) {
 
     // 最小起订量修改 梯度1的值等于最小起订量
     $scope.ProductupdateStartNumber = function(productUpOff) {
+      if (parseInt(productUpOff) >= parseInt($scope.productUpOff.goods.prices[0].start)) {
+        $scope.productUpOff.goods.prices[0].start = _item
+        return false
+      }
       $scope.productUpOff.goods.prices[0].start = parseInt(productUpOff)
     }
     // 最小起订量失去焦点

+ 72 - 23
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_storageCtrl.js

@@ -11,16 +11,6 @@ define([ 'app/app' ], function(app) {
         $scope.countData = 10;
         $scope.userInfo = $rootScope.userInfo || {};
 
-
-        /**
-         * 最大出入库数
-         * @type {number}
-         */
-        $scope.maxReserve = 999999999;
-        //数字的正则表达式
-        var intPattern = /^[1-9]+$/;
-        $scope.isInt = /^[0-9]*[1-9][0-9]*$/;
-
         // 更多操作数据和记录
         $scope.handleLink = [
             {name: '查看入库记录', tab: 'inBound', id: 0},
@@ -30,7 +20,6 @@ define([ 'app/app' ], function(app) {
             {name: '其它出库', tab: 'outBound', id: 1},
             {name: '销售出库', tab: 'outBound', id: 2}];
         $scope.handleItem = $stateParams.storage_tab ? 1 : ($scope.storage_tab === 'inBound'? $scope.handleLink[0].id : $scope.handleLink[3].id);
-        // $scope.handleItem = 2;
 
         // 销售方式数据
         $scope.boundType = {
@@ -148,6 +137,7 @@ define([ 'app/app' ], function(app) {
             $scope.storage_tab = type;
             $scope.type = $scope.storage_tab === 'inBound'? 'INBOUND' : 'OUTBOUND';
             getLoadStorageData();
+            initOtherData();
         };
 
         // 操作类型切换
@@ -156,6 +146,7 @@ define([ 'app/app' ], function(app) {
             if(type !== 1) {
                 getLoadStorageData();
             }
+            initOtherData();
             clearRecordParams();
         };
         // 销售方式筛选
@@ -287,15 +278,47 @@ define([ 'app/app' ], function(app) {
 
         // 展开收起
         $scope.unfoldClick = function (data, type) {
+            $scope.logistics.number = '';
+            $scope.logistics.companyName = '';
             angular.forEach(data, function(key) {
                 type.id !== key.id ? key.seleted = false : key.seleted = true;
             })
         };
 
+        // 点击外面清除弹窗
+        $scope.clearOtherData = function() {
+            angular.forEach($scope.otherData, function(val) {
+                val.show = false;
+                if(!val.id){
+                    val.pbranden = '';
+                    val.key = '';
+                    val.kind = '';
+                    val.spec = '';
+                    val.qty = '';
+                    val.price = '';
+                }
+            })
+        }
+
         $scope.onChange = function (type) {
+            angular.forEach($scope.otherData, function(val) {
+                val.show = false;
+            })
             type.show = true;
             Goods.getKeywordToProductId({keyword: type.key}, function(data) {
-                $scope.listData = data
+                if(data.length <= 0) {
+                    toaster.pop('info', '提示', '该型号不存在你的产品库中!');
+                    type.pbranden = '';
+                    type.key = '';
+                    type.kind = '';
+                    type.spec = '';
+                    type.qty = '';
+                    type.price = '';
+                    $scope.listData = [];
+                    type.show = false;
+                } else {
+                    $scope.listData = data
+                }
             }, function (res) {
                 $scope.listData = [];
                 type.show = false;
@@ -309,6 +332,8 @@ define([ 'app/app' ], function(app) {
             type.kind = key.kind;
             type.spec = key.spec;
             type.id = key.id;
+            type.qty = key.erpReserve;
+            type.price = key.price;
         };
 
         $scope.addOneTable = function (type) {
@@ -495,21 +520,45 @@ define([ 'app/app' ], function(app) {
         };
 
         //数量进行验证
-        $scope.onAmountChange = function (item, val, type, key) {
-            if (!(/^[0-9]*$/).test(val)) {
-                var chineseIndex = -1;
-                for (var i = 0; i < val.length; i++) {
-                    if (!(/^[0-9]*$/).test(val.charAt(i))) {
-                        chineseIndex = i;
-                        break;
+        $scope.onAmountChange = function (item, val, type, key, deg) {
+            if (deg) {
+                if (angular.isNumber(Number(val))) {
+                    if (val >= 10000) {
+                        item[type] = Number(val.toString().substring(0, key));
+                    } else if (val.toString().indexOf('.') > -1) {
+                        var arr = val.toString().split(".");
+                        if (arr[0].length > key) {
+                            item[type] = Number(arr[0].substring(0, key) + '.' + arr[1]);
+                        } else if (arr[1].length > deg) {
+                            item[type] = Number(arr[0] + '.' + arr[1].substring(0, deg));
+                        }
                     }
+                } else {
+                    item[type] = ''
+                }
+            } else {
+                if (!(/^[0-9]*$/).test(val)) {
+                    var chineseIndex = -1;
+                    for (var i = 0; i < val.length; i++) {
+                        if (!(/^[0-9]*$/).test(val.charAt(i))) {
+                            chineseIndex = i;
+                            break;
+                        }
+                    }
+                    item[type] = cutOutString(val, chineseIndex);
+                } else if (val.length > key) {
+                    item[type] = cutOutString(val, key);
                 }
-                item[type] = cutOutString(val, chineseIndex);
-            } else if (val.length > key) {
-                item[type] = cutOutString(val, key);
             }
         };
 
+        $scope.checkAmount = function (item, val, type) {
+            $scope.validObj.amount = $scope.applyObj.amount === '' ? true
+                : $scope.applyObj.amount > 0 && $scope.applyObj.amount
+                < 1000000000;
+            return $scope.validObj.amount;
+        }
+
         $scope.outBlurSendCount = function(details, val) {
             var newShipQty = details.shipQty ? details.shipQty : 0
             if (val > details.number - newShipQty) {
@@ -571,7 +620,7 @@ define([ 'app/app' ], function(app) {
                 // TODO huxz 跳转到订单管理页面
                 if (res.success) {
                     toaster.pop("success", "信息", "发货成功");
-                    $state.go('vendor_order');
+                    // $state.go('vendor_order');
                 } else {
                     toaster.pop("error", res.message);
                 }

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/buyer_order.html

@@ -1006,7 +1006,7 @@
                                   取消订单
                               </a>
                               <a class="operate-height" ng-if="order.paidTimeFromNow > notifySellerShip - 1" style="display: block;position: relative;">
-                                  <em class="order-operation" ng-click="remindShip(order)" ng-class="{true : 'order-operation',false : 'order-operation-disabled'}[order.lastNotiDelivery > notifySellerShip - 1 || !order.lastNotifyDeliveryTime]">提醒发货</em>
+                                  <em class="order-operation" ng-click="remindShip(order)" ng-class="{true : 'order-operation',false : 'order-operation-disabled'}[order.lastNotiDelivery > notifySellerShip - 1 || !order.lastNotifyDeliveryTime]" ng-if="!order.signReceive">提醒发货</em>
                                   <div class="seller-ship-tip">
                                      <img ng-if="order.lastNotiDelivery < notifySellerShip && order.lastNotifyDeliveryTime" src="static/img/common/notice-tip.png" ng-mouseover="order.noticeTip = true" ng-mouseleave="order.noticeTip = false"/>
                                   </div>

+ 18 - 3
src/main/webapp/resources/view/usercenter/forstore/order_detail.html

@@ -294,6 +294,19 @@
 <div class="user_right fr">
 	<!--叮当详情-->
 	<div class="oder_detail" id="oder-detail" >
+		<div class="log_menu" ng-if="!acceptGoods">
+			<div class="sendGoodsList" >
+				<li ng-repeat="item in sendGoodsList">
+					<label class="com-check-radio"   ng-click="ChooseSendGoodsItem(item, $index, $event)">
+						<input type="radio" name="autoMonth" name="date" ng-checked="CheckId === 'autoMonth'+$index">
+						<label style="vertical-align: top"  name="autoMonth" ></label>
+						<div class="clearfix">
+							<div style="color: #666">发货单:</div><div style="color: #333">{{item}}</div>
+						</div>
+					</label>
+				</li>
+			</div>
+		</div>
 		<div ng-if="!acceptGoods">
 			<div class="logistics" ng-if="order.status != 602 && order.status != 603 && order.status != 604 && order.status != 605 && order.status != 606 && order.status != 315" ng-cloak>
 			<ul>
@@ -440,7 +453,7 @@
 
 			<div class="sendGoodsList">
 				<li ng-repeat="item in sendGoodsList">
-					<label class="com-check-radio"   ng-click="ChooseSendGoodsItem(item, $index)">
+					<label class="com-check-radio"   ng-click="ChooseSendGoodsItem(item, $index, $event)">
 						<input type="radio" name="autoMonth" name="date" ng-checked="CheckId === 'autoMonth'+$index">
 						<label style="vertical-align: top"  name="autoMonth" ></label>
 						<div class="clearfix">
@@ -451,6 +464,7 @@
 			</div>
 
 		</div>
+
 		<!-- /end 收入入库抬头 -->
 
 		<!--订单信息-->
@@ -582,7 +596,8 @@
 								<!--</div>-->
 								<!-- 本次收货 -->
 								<div class="text-area">
-                  <i>{{detail.receiveCount || '-'}}</i>
+									<i ng-if="orderStatus">{{detail.receiveCount}}</i>
+                  <i ng-if="!orderStatus">-</i>
                 </div>
 							</span>
 						</dd>
@@ -656,7 +671,7 @@
 			<div style="clear: both"></div>
 		</div>
 		<!--物流信息-->
-		<div ng-if="!acceptGoods">
+		<div>
 		<div class="logistics_list01" ng-if="order.status != 602 && order.status != 603 && order.status != 604 && order.status != 605 && order.status != 606 && order.status != 315">
 			<div class="log_menu">
 				<span>物流信息<em style="color: #666;" ng-if="!logistics.companyName&& noLogisticInfoArray[order.status]">(暂无物流信息)</em>

+ 48 - 0
src/main/webapp/resources/view/usercenter/forstore/query_logistics.html

@@ -186,6 +186,41 @@
     .logistics_list_xq .empty .empty-info i{
         margin-right:5px;
     }
+    .sendGoodsList {
+        padding: 0 25px;
+    }
+    .sendGoodsList:after {
+        clear: both;
+        content: ' ';
+        zoom: 1;
+        display: block;
+        visibility: hidden;
+    }
+    .sendGoodsList li {
+        float: left;
+        width: 50%;
+    }
+    .sendGoodsList li .clearfix {
+        display: inline-block;
+        line-height: 40px;
+    }
+    .sendGoodsList li .clearfix:after {
+        clear: both;
+        content: ' ';
+        zoom: 1;
+        display: block;
+        visibility: hidden;
+    }
+    .sendGoodsList li .clearfix div {
+        float: left;
+        font-size: 14px;
+    }
+    label {
+        margin-bottom: 0px;
+    }
+    .com-check-radio input[type='radio'] + label {
+        top: 14px !important;
+    }
 </style>
 <!--右侧主体部分-->
 <div class="user_right fr">
@@ -195,6 +230,19 @@
             <div class="logistics_cter_01">
                 <!--包裹跟踪-->
                 <div class="tab" style="display: inline-block;">
+                    <div class="log_menu">
+                        <div class="sendGoodsList" >
+                            <li ng-repeat="item in sendGoodsList">
+                                <label class="com-check-radio"   ng-click="ChooseSendGoodsItem(item, $index, $event)">
+                                    <input type="radio" name="autoMonth" name="date" ng-checked="CheckId === 'autoMonth'+$index">
+                                    <label style="vertical-align: top"  name="autoMonth" ></label>
+                                    <div class="clearfix">
+                                        <div style="color: #666">发货单:</div><div style="color: #333">{{item}}</div>
+                                    </div>
+                                </label>
+                            </li>
+                        </div>
+                    </div>
                     <div class="log_cter_h" style="position: relative">
                         <span style="margin-right: 0;">订单号:</span>
                         <span style="margin-left: 0; margin-right: 30px;" ng-bind="order.orderid"></span>

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_delivery.html

@@ -767,8 +767,8 @@
                 </em>
               </span>
               <span style="width: 10%;" ng-bind="detail.number">100</span>
-              <span ng-show="!isChange" class="wd01 red" ng-bind="detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
-              <span ng-show="isChange" class="wd01 red" ng-bind="detail.currentTaxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
+              <span style="white-space: nowrap;overflow: hidden;" ng-show="!isChange" class="wd01 red" ng-bind="detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.taxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
+              <span style="white-space: nowrap;overflow: hidden;" ng-show="isChange" class="wd01 red" ng-bind="detail.currentTaxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.currentTaxUnitPrice * detail.number | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
 
               <span class="wd01" style="line-height: 18px;">
                 <!--<textarea placeholder="可填写产品备注!例如物料编号"></textarea>-->

+ 3 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_material.html

@@ -1172,8 +1172,9 @@
 										</li>
 										<li style="font-size: 14px;color: #333;background: #fff;" class='priceInfoList' ng-repeat="price in material.goods.prices">
 											<span class="fl w50" style="width: 50%;border-right:1px solid #dcdcdc">{{price.start}}+</span>
-											<span class="fl w50" style="width: 50%;overflow: hidden" title="{{price.rMBPrice || price.uSDNTPrice}}">
-												{{!store.enType || store.enType === 'HK' ? '$' : '¥'}}{{price.rMBPrice || price.uSDNTPrice }}</span>
+											<span class="fl w50" style="width: 50%;overflow: hidden" title="{{price.rMBPrice}}">
+												{{!store.enType || store.enType === 'HK' ? '$' : '¥'}}
+												{{price.rMBPrice || price.uSDNTPrice }}</span>
 											<div class="clearfix"></div>
 										</li>
 										<li style="font-size: 14px;color: #333;background: #fff;" class='priceInfoList' ng-if="!material.goods || material.goods.prices.length === 0">

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_order.html

@@ -1451,7 +1451,7 @@
                                 <a class="order-operation" href="javascript:void(0)" ng-if="(purchase.status == 502 || purchase.status == 406)&&(purchase.uasPurcid == null)" ng-click="toBeShiped(purchase)">发货出库</a>
 								<a ng-if="purchase.uasPurcid" style="text-decoration: none;color: #323232;">来源UAS</a>
                                 <!--<a class="order-operation" href="javascript:void(0)" ng-if="purchase.status == 404 && purchase.lgtId&&!purchase.uasPurcid" ng-click="toBeShiped(purchase)" style="position: relative;">修改物流</a>-->
-                                <a class="order-operation" href="javascript:void(0)" ng-if="purchase.status == 404 &&!purchase.uasPurcid" ng-click="modifyLogistic(purchase)" style="position: relative;">修改物流</a>
+                                <!--<a class="order-operation" href="javascript:void(0)" ng-if="purchase.status == 404 &&!purchase.uasPurcid" ng-click="modifyLogistic(purchase)" style="position: relative;">修改物流</a>-->
 								<a class="order-operation" href="javascript:void(0)" ng-click="getModal(purchase,'addRate')" style="position: relative;" ng-if="[405,503,514,506,511,520].indexOf(purchase.status) != -1 && !purchase.isAfterRate && purchase.isFirstRate && requestOver==purchases.length">追加评价</a>
 								<a class="order-operation" href="javascript:void(0)" style="position: relative;" ng-click="getModal(purchase,'firstRate')" ng-if="[405,503,514,506,511,520].indexOf(purchase.status) != -1 && !purchase.isFirstRate && requestOver==purchases.length">评价</a>
 								<!--<div ng-if="purchase.status == 520" class="clock-mind">

+ 14 - 15
src/main/webapp/resources/view/vendor/forstore/vendor_storage.html

@@ -1138,8 +1138,11 @@
         -webkit-border-radius: 5px !important;
         border-radius: 5px !important;
     }
+    .wanted_list em.red_color{
+        color:#f00;
+    }
 </style>
-<div class="user_right fr" ng-click="">
+<div class="user_right fr" ng-click="clearOtherData()">
     <!--货品管理-->
     <div class="pro_management device">
         <div class="com_tab">
@@ -1221,7 +1224,7 @@
                         ng-click="toggleType(item.id)"></li>
                 </ul>
                 <div class="search fr check" ng-if="handleItem !== 1">
-                    <input type="text" class="form-control" ng-model="keyword" ng-search="onSearch(keyword)" placeholder="{{storage_tab =='outBound' ? '订单号/买家名称' : '发货单/卖家名称'}}"/>
+                    <input type="text" class="form-control" ng-model="keyword" ng-search="onSearch(keyword)" placeholder="{{storage_tab =='outBound' ? '订单号/买家名称' : ( handleItem === 0 ? '入库订单/卖家名称':'发货单/卖家名称')}}"/>
                     <button ng-click="onSearch(keyword)" style="float: left;">搜索</button>
                 </div>
             </div>
@@ -1234,7 +1237,7 @@
                     <th width="120" ng-bind="storage_tab === 'inBound' ? '入库单号' : '出库单号'"></th>
                     <th width="180" ng-bind="storage_tab === 'inBound' ? '发货单' : '订单号'" ng-if="handleItem === 2"></th>
                     <th width="180" ng-bind="storage_tab === 'inBound' ? '卖家名称' : '买家名称'"></th>
-                    <th class="filter" width="110" ng-if="handleItem !== 0">类型</th>
+                    <th class="filter" width="110" ng-if="handleItem == 2">类型</th>
                     <th class="filter" width="110" ng-if="handleItem === 0">
                         <a ng-bind="selfSupport">全部类型</a> <i class="fa fa-angle-down fa-angle-up"></i>
                         <div class="hover-show" ng-if="storage_tab === 'inBound'">
@@ -1261,7 +1264,7 @@
                     <td ng-bind="item.affiliatedEnterprise || '-'">深圳有陵县什么 翁一搂的</td>
                     <td ng-bind="boundType[item.opertatorType]">腌肉入库</td>
                     <td ng-bind="item.operaterUserName">张三</td>
-                    <td ng-bind="item.createTime | date : 'yyyy-MM-dd: hh:mm:ss'">2018-12-12 12:!@:</td>
+                    <td ng-bind="item.createTime | date : 'yyyy-MM-dd: HH:mm:ss'">2018-12-12</td>
                     <td><span class="btn-toggle" ng-show="item.seleted" ng-click="item.seleted = !item.seleted">收起 <i class="fa fa-angle-up"></i></span><span ng-click="unfoldClick(storageList,item)" class="btn-toggle" ng-show="!item.seleted">展开 <i class="fa fa-angle-down"></i></span></td>
                 </tr>
                 <tr ng-show="item.seleted">
@@ -1307,13 +1310,12 @@
                 <tr style="background:#f5f5f5;">
                     <td>系统自动生成</td>
                     <td><input type="text" class="form-control" ng-model="othenParam.enName"></td>
-                    <td ng-bind="storage_tab === 'inBound' ? '其它入库' : '其它出库'">其它入库</td>
                     <td ng-bind="userInfo.userName">张三</td>
                     <td ng-bind="newDate">2018-12-12</td>
                     <td><a class="btn-click" ng-click="otherAddClick()">确认</a><a class="btn-click" ng-click="otherAddClick('clear')">取消</a></td>
                 </tr>
                 <tr>
-                    <td colspan="6">
+                    <td colspan="5">
                         <table class="wanted-sub-tab table">
                             <caption>
                                 明细列表:
@@ -1321,11 +1323,11 @@
                             <thead>
                             <tr>
                                 <th width="60">序号</th>
-                                <th width="110">*型号</th>
+                                <th width="110"><em class="red_color">*</em>型号</th>
                                 <th width="130">品牌</th>
                                 <th>物料名称</th>
                                 <th width="210">规格</th>
-                                <th width="130">{{storage_tab === 'inBound' ? '*入库数' : '*出库数'}}(PCS)</th>
+                                <th width="130"><em class="red_color">*</em>{{storage_tab === 'inBound' ? '入库数' : '出库数'}}(PCS)</th>
                                 <th width="130">单价({{currency === 'RMB' ? '¥' : '$'}})</th>
                             </tr>
                             </thead>
@@ -1335,7 +1337,7 @@
                                 <td>
                                     <span ng-if="!item.newId" ng-bind="item.pcmpcode || '-'" title="{{item.pcmpcode}}"></span>
                                     <div class="down-form" ng-if="item.newId">
-                                        <input type="text" class="form-control" ng-model="item.key" ng-change="onChange(item)">
+                                        <input type="text" class="form-control" ng-model="item.key" ng-change="onChange(item, index)">
                                         <div ng-show="item.show" class="down-key" ng-mouseenter="item.show = true">
                                             <ul class="list-unstyled">
                                                 <li ng-repeat="list in listData" ng-click="addProductId(list, item)">
@@ -1344,9 +1346,6 @@
                                                     <span ng-bind="list.kind || '-'" title="{{list.kind}}"></span>
                                                     <span ng-bind="list.spec || '-'" title="{{list.spec}}"></span>
                                                 </li>
-                                                <li ng-if="listData.length <= 0">
-                                                    <div>没的找到与“{{item.key}}”产品信息</div>
-                                                </li>
                                             </ul>
                                         </div>
                                     </div>
@@ -1354,8 +1353,8 @@
                                 <td><span ng-bind="item.pbranden || '-'" title="{{item.pbranden}}"></span></td>
                                 <td><span ng-bind="item.kind || '-'" title="{{item.kind}}"></span></td>
                                 <td><span ng-bind="item.spec || '-'" title="{{item.spec}}"></span></td>
-                                <td><input type="text" ng-pattern="/^[1-9]\d*$/" class="form-control" ng-model="item.qty" ng-change="onAmountChange(item, item.qty, 'qty', 9)" ng-blur=""></td>
-                                <td><input type="text" ng-pattern="/^((\d)|(\d+\.?\d+))$/" class="form-control" ng-model="item.price" ng-change="onAmountChange(item, item.price, 'price', 4)" ng-blur=""></td>
+                                <td><input type="text" class="form-control" ng-model="item.qty" ng-change="onAmountChange(item, item.qty, 'qty', 9)"></td>
+                                <td><input type="text" class="form-control" ng-model="item.price" ng-change="onAmountChange(item, item.price, 'price', 4, 6)"></td>
                             </tr>
                             <tr>
                                 <td colspan="7">
@@ -1435,7 +1434,7 @@
                                     <th width="180">规格</th>
                                     <th width="100" ng-if="storage_tab === 'outBound'">应出库(PCS)</th>
                                     <th width="100" ng-if="storage_tab === 'outBound'">已出库(PCS)</th>
-                                    <th width="100">{{storage_tab === 'inBound' ? '*入库数' : '*出库数'}}(PCS)</th>
+                                    <th width="100"><em class="red_color">*</em>{{storage_tab === 'inBound' ? '入库数' : '出库数'}}(PCS)</th>
                                     <th width="80">单价({{currency === 'RMB' ? '¥' : '$'}})</th>
                                 </tr>
                                 </thead>