Browse Source

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

yujia 7 years ago
parent
commit
f31d9dca4c

+ 14 - 0
src/main/java/com/uas/platform/b2c/trade/seek/controller/SeekPurchaseBomController.java

@@ -29,6 +29,7 @@ import org.springframework.web.servlet.ModelAndView;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -275,4 +276,17 @@ public class SeekPurchaseBomController {
         logger.log("求购", "部分发布bom求购,detailIds: " + detailIds);
         return seekPurchaseBomService.confirmBomSelectedItems(detailIds, inquiryServiceInnerUrl, endTime, count);
     }
+
+    /**
+     * 保存新增物料
+     * @param newProducts
+     * @return
+     */
+    @RequestMapping(value = "/bom/detail/add", method = RequestMethod.POST)
+    public ModelMap saveBomProducts(@RequestBody List<SeekPurchaseByBatch> newProducts){
+        ModelMap map = seekPurchaseBomService.saveNewProducts(newProducts);
+        logger.log("求购", "保存新增物料, newProducts:{}" + newProducts);
+        return  map;
+
+    }
 }

+ 9 - 0
src/main/java/com/uas/platform/b2c/trade/seek/service/SeekPurchaseBomService.java

@@ -6,6 +6,8 @@ import com.uas.platform.b2c.trade.seek.model.SeekPurchaseBomList;
 import com.uas.platform.b2c.trade.seek.model.SeekPurchaseByBatch;
 import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.model.PageInfo;
+
+import java.util.List;
 import java.util.Map;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.data.domain.Page;
@@ -137,4 +139,11 @@ public interface SeekPurchaseBomService {
      * @return
      */
     SeekPurchaseBom findOneWithoutDetail(Long bomId);
+
+    /**
+     * 保存新增物料
+     * @param newProducts
+     * @return
+     */
+    ModelMap saveNewProducts(List<SeekPurchaseByBatch> newProducts);
 }

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

@@ -6,6 +6,8 @@ import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
 import com.uas.platform.b2c.core.utils.StringUtilB2C;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
+import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
+import com.uas.platform.b2c.prod.commodity.model.Product;
 import com.uas.platform.b2c.prod.product.brand.dao.BrandDao;
 import com.uas.platform.b2c.prod.product.brand.modal.Brand;
 import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
@@ -98,6 +100,9 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
     @Autowired
     private SearcherService searcherService;
 
+    @Autowired
+    private ProductDao productDao;
+
     private static final UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
 
     /**
@@ -116,11 +121,11 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
     public final int CODENUM = 2;
     // 品牌
     public final int BRANDNUM = 0;
-//    // 截止日期
+    //    // 截止日期
 //    public final int DEADLINENUM = 4;
     // 采购数量
     public final int AMOUNTNUM = 4;
-//    public static final int CURRENCYNUM = 6;
+    //    public static final int CURRENCYNUM = 6;
 //    public static final int UNITPRICENUM = 7;
 //    public static final int ENCAPSULATIONNUM = 8;
 //    public static final int PRODUCEDATENUM = 9;
@@ -132,6 +137,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
     /**
      * 导入bom
+     *
      * @param workbook
      * @param bomName
      * @return
@@ -200,6 +206,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
     /**
      * 校验第二行是否为商城示例
+     *
      * @param row
      * @return
      */
@@ -218,6 +225,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
     /**
      * 验证是否为商城模板
+     *
      * @param headerRow
      * @return
      */
@@ -255,6 +263,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
     /**
      * 将列信息注入到求购临时实体中
+     *
      * @param row
      * @param seekPurchaseByBatch
      * @param rowNum
@@ -404,13 +413,14 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
     /**
      * 判断输入是否合法
+     *
      * @param code
      * @return
      */
     private String match(String code) {
         List<String> filterList = Arrays.asList("空", "没", "无", "—", "-", "null", "#N/A");
         for (String s : filterList) {
-            if (s.equals(code)){
+            if (s.equals(code)) {
                 return null;
             }
         }
@@ -419,6 +429,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
     /**
      * 读取excel
+     *
      * @return
      */
     private Object readWorkBookCell(Cell cell, int cellType, int r, int n) {
@@ -426,7 +437,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         try {
             if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK) {
                 switch (cellType) {
-                    case Cell.CELL_TYPE_STRING :
+                    case Cell.CELL_TYPE_STRING:
                         cell.setCellType(HSSFCell.CELL_TYPE_STRING);
                         String str = cell.getStringCellValue().trim();
                         if (str.indexOf("\u00A0") > 0) {
@@ -435,7 +446,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
                         str = StringUtilB2C.replaceTabAndLineBreak(str);
                         obj = str.trim();
                         break;
-                    case Cell.CELL_TYPE_NUMERIC :
+                    case Cell.CELL_TYPE_NUMERIC:
                         cell.setCellType(Cell.CELL_TYPE_NUMERIC);
                         obj = cell.getNumericCellValue();
                         if (obj != null) {
@@ -445,7 +456,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
                             }
                         }
                         break;
-                    default :
+                    default:
                         if (cell.getCellType() == Cell.CELL_TYPE_STRING) {
                             String productTime = cell.getStringCellValue();
                             Pattern p = Pattern.compile("\\s*|\t|\r|\n");
@@ -475,7 +486,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         }
         Page<SeekPurchaseByBatch> pageSeeks = seekPurchaseByBatchDao.findAll(new Specification<SeekPurchaseByBatch>() {
             public Predicate toPredicate(Root<SeekPurchaseByBatch> root, CriteriaQuery<?> query,
-                    CriteriaBuilder builder) {
+                                         CriteriaBuilder builder) {
                 query.where(pageInfo.getPredicates(root, query, builder));
                 return null;
             }
@@ -509,6 +520,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
     /**
      * 根据型号和品牌类目匹配
+     *
      * @param brand
      * @param code
      * @return
@@ -562,7 +574,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         pageInfo.sorting("releaseDate", Direction.DESC);
         Page<SeekPurchaseBomList> pageSeeks = seekPurchaseBomListDao.findAll(new Specification<SeekPurchaseBomList>() {
             public Predicate toPredicate(Root<SeekPurchaseBomList> root, CriteriaQuery<?> query,
-                    CriteriaBuilder builder) {
+                                         CriteriaBuilder builder) {
                 query.where(pageInfo.getPredicates(root, query, builder));
                 return null;
             }
@@ -625,7 +637,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
     public Page<SeekPurchaseBom> findAllByPageInfo(final PageInfo pageInfo, String keyword) {
         Sort sort = new Sort(Sort.Direction.DESC, "id");
         pageInfo.setSort(sort);
-        pageInfo.setOffset((pageInfo.getPageNumber() -1 ) * pageInfo.getPageSize());
+        pageInfo.setOffset((pageInfo.getPageNumber() - 1) * pageInfo.getPageSize());
         if (!StringUtils.isEmpty(keyword)) {
             pageInfo.expression(PredicateUtils.like("name", keyword, false));
         }
@@ -758,10 +770,10 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
     /**
      * 部分发布,bom明细非全选时
      *
-     * @param detailIds              detail id串   1,2,3,4...
-     * @param endTime 截止时间  时间戳
-     * @param count 采购套数
-     * @param url 询价服务地址
+     * @param detailIds detail id串   1,2,3,4...
+     * @param endTime   截止时间  时间戳
+     * @param count     采购套数
+     * @param url       询价服务地址
      * @return 处理结果
      */
     @Override
@@ -795,10 +807,11 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
 
     /**
      * 发布bom询价
-     * @param url  询价服务url
-     * @param seekPurchaseByBatchList  bom明细List
-     * @param endTime 截止时间  时间戳
-     * @param count 采购套数
+     *
+     * @param url                     询价服务url
+     * @param seekPurchaseByBatchList bom明细List
+     * @param endTime                 截止时间  时间戳
+     * @param count                   采购套数
      * @return 处理结果
      */
     private ResultMap publishBomInquiry(String url, List<SeekPurchaseByBatch> seekPurchaseByBatchList, SeekPurchaseBom seekPurchaseBom, Long endTime, Integer count) {
@@ -858,10 +871,10 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         inquiry.setInquiryItems(inquiryItems);
         String res = "";
         try {
-            res = HttpUtil.doPost(url + "/inquiry/buyer/save",  FlexJsonUtils.toJsonDeep(inquiry));
-            logger.log("bom求购确认发布成功",user.getUserUU() + ",参数:" + FlexJsonUtils.toJsonDeep(inquiry));
+            res = HttpUtil.doPost(url + "/inquiry/buyer/save", FlexJsonUtils.toJsonDeep(inquiry));
+            logger.log("bom求购确认发布成功", user.getUserUU() + ",参数:" + FlexJsonUtils.toJsonDeep(inquiry));
         } catch (Exception e) {
-            logger.log("bom求购确认发布报错",user.getUserUU() + ",错误:" + e.getMessage() + "参数:" + FlexJsonUtils.toJsonDeep(inquiry));
+            logger.log("bom求购确认发布报错", user.getUserUU() + ",错误:" + e.getMessage() + "参数:" + FlexJsonUtils.toJsonDeep(inquiry));
             e.printStackTrace();
             throw new IllegalOperatorException("发布失败");
         }
@@ -870,4 +883,55 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
         return ResultMap.success(result);
     }
 
+    @Override
+    public ModelMap saveNewProducts(List<SeekPurchaseByBatch> newProducts) {
+        ModelMap map = new ModelMap();
+        try {
+            List<Product> products = new ArrayList<>();
+            //判断传入参数是否为空
+            if (CollectionUtils.isEmpty(newProducts)) {
+                map.put("success", false);
+                map.put("message", "参数为空");
+            }
+            //获取传入参数第一个Bomid,为判断新增物料是否为同一个Bom清单里的
+            Long bomId = newProducts.get(0).getBomId();
+            for (SeekPurchaseByBatch newProduct : newProducts) {
+                if (newProduct.getBomId() == null && !Objects.equals(newProduct.getBomId(), bomId)) {
+                    map.put("success", false);
+                    map.put("message", "没有找到Bom清单id或者bomId不一致");
+                    return map;
+                }
+                Date now = new Date();
+                newProduct.setReleaseDate(now);
+                //如果该物料在物料表中不存在,则将新增物料添加到物料表中
+                Product product = new Product();
+                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));
+                    product.setBrand(newProduct.getBrand());
+                    product.setCmpCode(newProduct.getCode());
+                    product.setPbranden(newProduct.getBrand());
+                    product.setPcmpcode(newProduct.getCode());
+                    product.setSpec(newProduct.getSpec());
+                    product.setProdName(newProduct.getKind());
+                    product.setKind(newProduct.getKind());
+                    products.add(product);
+                }
+            }
+            seekPurchaseByBatchDao.save(newProducts);
+            SeekPurchaseBom bom = seekPurchaseBomDao.findOne(bomId);
+            //bom清单中数量按照传入条数增加
+            bom.setAmount(bom.getAmount() + newProducts.size());
+            seekPurchaseBomDao.save(bom);
+            if (!CollectionUtils.isEmpty(products)) {
+                productDao.save(products);
+            }
+            map.put("success", true);
+        } catch (Exception e) {
+            map.put("success", false);
+            map.put("message", e.getMessage());
+        }
+        return map;
+    }
 }

+ 5 - 0
src/main/webapp/resources/js/common/query/seekPurchase.js

@@ -110,6 +110,11 @@ define([ 'ngResource' ], function() {
             deleteBom: {
                 url: 'seek/bom/delete',
                 method: 'DELETE'
+            },
+            // 新增物料信息
+            addEaterialObj: {
+                url: 'seek/bom/detail/add',
+                method: 'POST'
             }
 		});
 }])

+ 62 - 10
src/main/webapp/resources/js/usercenter/controllers/forstore/bomListDetailCtrl.js

@@ -49,6 +49,9 @@ define(['app/app'], function(app) {
         $scope.editBom = false;
         // 是否编辑询价
         $scope.editSeek = false;
+        // 是否新增物料
+        $scope.addNew = false;
+        $scope.newMateriel = [];
         // bom数据
         $scope.bomData = {};
         // 求购参数
@@ -124,7 +127,7 @@ define(['app/app'], function(app) {
                     }, function (err) {
                         toaster.pop('error', err.data);
                     })
-                } else {
+                } else if($scope.editSeek){
                     if (!$scope.seekObj.count) {
                         toaster.pop('error', '请输入采购数量');
                     } else if (!$scope.seekObj.endTime) {
@@ -168,14 +171,40 @@ define(['app/app'], function(app) {
                             })
                         }
                     }
+                } else {
+                    // 批量验证
+                    for (var i = 0; i < $scope.newMateriel.length; i++) {
+                        if (!$scope.checkAllProduct($scope.newMateriel[i])) {
+                            return;
+                        }
+                    }
+                    angular.forEach($scope.newMateriel, function(val){
+                        val.bomId = $scope.bomData.id
+                    })
+                    seekPurchase.addEaterialObj(null, $scope.newMateriel, function (data) {
+                        if (data.success) {
+                            toaster.pop('success', '新增物料成功');
+                            $scope.addNewMateriel(false);
+                            loadData();
+                            $scope.newMateriel = []
+                        } else {
+                            toaster.pop('error', data.message);
+                        }
+                    }, function (err) {
+                        toaster.pop('error', err.data);
+                    })
                 }
             } else {
                 if ($scope.editBom) {
                     // 取消BOM编辑
                     $scope.setEditBom(false);
-                } else {
+                } else if($scope.editSeek){
                     // 取消发布求购
                     $scope.setEditSeek(false);
+                } else {
+                    // 取消新增物料
+                    $scope.addNewMateriel(false);
+                    $scope.newMateriel = [];
                 }
             }
         }
@@ -186,6 +215,10 @@ define(['app/app'], function(app) {
                 toaster.pop('info', '请先保存求购信息');
                 return;
             }
+            if (editBom && $scope.addNew) {
+                toaster.pop('info', '请先保存新增物料');
+                return;
+            }
             // 编辑中临时数据
             $scope.tmpEditBom = angular.copy($scope.bomData);
             // 最少选中一个
@@ -209,6 +242,10 @@ define(['app/app'], function(app) {
                 toaster.pop('info', '请先保存BOM修改');
                 return;
             }
+            if (editSeek && $scope.addNew) {
+                toaster.pop('info', '请先保存新增物料');
+                return;
+            }
             if ($scope.editSeek) {
                 $scope.seekObj.endTime = '';
                 $scope.seekObj.count = '';
@@ -218,7 +255,29 @@ define(['app/app'], function(app) {
                 $scope.setAllCheck(false);
             }
             $scope.editSeek = editSeek;
-        }
+        };
+
+        // 新增单条物料信息
+        $scope.addNewMateriel = function (addNew) {
+            if (addNew && $scope.editSeek) {
+                toaster.pop('info', '请先保存求购信息');
+                return;
+            }
+            if (addNew && $scope.editBom) {
+                toaster.pop('info', '请先保存BOM修改');
+                return;
+            }
+            $scope.newMateriel.push({
+                brand: '',
+                kind: '',
+                code: '',
+                spec: '',
+                amount: 0
+            });
+            $scope.setAllCheck(false);
+            $scope.addNew = addNew;
+        };
+
         // 打开日期选择框
         $scope.openDatePicker = function ($event) {
             $event.preventDefault();
@@ -279,13 +338,6 @@ define(['app/app'], function(app) {
             })
         };
 
-        // 新增单条物料信息
-        $scope.addNewBom = function () {
-            $scope.bomData.seekPurchaseByBatchs.unshift({});
-            $scope.setEditBom(true);
-            $scope.onCheckAllCheck();
-        };
-
         // 删除BOM提示框
         $scope.showDeleteBomBox = false;
         $scope.setShowDeleteBomBox = function (flag) {

+ 1 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_delivery_ctrl.js

@@ -748,7 +748,7 @@ define(['app/app'], function(app) {
         // $scope.isSendCount = 0
         // todo 已发货信息到时候需要根据当前对象获取信息
         $scope.ChangeSendCount = function(details, val, ind) {
-            if (val.indexOf('.')) {
+            if (val.indexOf('.') > 0) {
               toaster.pop('warning', '提示', '发货数量不能输入小数点')
                 return
             }

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

@@ -147,6 +147,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     var deferred = $q.defer();
     Enterprise.getCurrencyByRegisterAddress(null, function(data) {
       deferred.resolve(data);
+      console.log(deferred)
     }, function(response) {
       deferred.reject(response);
     });
@@ -3710,6 +3711,10 @@ define(['app/app', 'jquery-uploadify'], function(app) {
         toaster.pop('error', '型号为必填项');
         return;
       }
+      if ($scope.Regul.minPackQty <= 0) {
+        toaster.pop('error', '最小包装数必须大于0');
+        return;
+      }
       if (!$scope.Regul.minPackQty || $scope.Regul.minPackQty === '') {
         toaster.pop('error', '最小包装数必填项');
         return;
@@ -3759,24 +3764,32 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     // 编辑上下架
     $scope.dateArea = 'formMe';
     $scope.editProductUpOff = function(commodity, index) {
+      if (commodity.erpReserve === '' ||  commodity.minPackQty === 0) {
+        toaster.pop('warning','提示','当前物料库存为0,请先入库')
+        return;
+      }
+      if (commodity.minPackQty === 0  || commodity.minPackQty === '') {
+        toaster.pop('warning','提示','请先编辑物料,最小包装数选项')
+        return;
+      }
       if (commodity.editProductUpOff) return
       $scope.clearCheckBox()
       commodity.editProductUpOff = true
       $scope.productUpOff = _deepCopy(commodity)
       if (!$scope.productUpOff.goods) {
         $scope.productUpOff.goods = {
-          prices: [{'start': $scope.productUpOff.minPackQty, rMBPrice: ''}],
           selfSale: 1,
           breakUp: true,
-          autoPublish: $scope.productUpOff.goods.status === 601 || $scope.productUpOff.goods.status === 602 || false,
+          autoPublish: ($scope.productUpOff.goods && ($scope.productUpOff.goods.status === 601 || $scope.productUpOff.goods.status === 602)) || false,
           productid: $scope.productUpOff.id,
           minDelivery: 1,
           maxDelivery: 10,
-          minBuyQty: $scope.productUpOff.minPackQty,
-
+          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
       $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' // 自营还是销售

+ 70 - 25
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_storageCtrl.js

@@ -1,6 +1,6 @@
 define([ 'app/app' ], function(app) {
     'use strict';
-    app.register.controller('vendor_storageCtrl', ['$scope', '$rootScope', '$stateParams', 'BaseService', 'Goods', 'KdnLogistics', '$modal', 'toaster', 'Loading', 'AuthenticationService', '$q', '$upload', '$http', 'ngTableParams', 'InvoiceFPurchase', 'ShippingAddress', function ($scope, $rootScope, $stateParams, BaseService, Goods, KdnLogistics, $modal, toaster, Loading, AuthenticationService, $q, $upload, $http, ngTableParams, InvoiceFPurchase, ShippingAddress) {
+    app.register.controller('vendor_storageCtrl', ['$scope', '$rootScope', '$stateParams', 'BaseService', 'Goods', 'KdnLogistics', '$modal', 'toaster', 'Loading', 'AuthenticationService', '$q', '$upload', '$http', 'ngTableParams', 'InvoiceFPurchase', 'ShippingAddress', 'Enterprise', function ($scope, $rootScope, $stateParams, BaseService, Goods, KdnLogistics, $modal, toaster, Loading, AuthenticationService, $q, $upload, $http, ngTableParams, InvoiceFPurchase, ShippingAddress, Enterprise) {
         $rootScope.active = 'vendor_storage';
         $scope.keyword = '';
         $scope.type = '';
@@ -9,11 +9,17 @@ define([ 'app/app' ], function(app) {
         document.title = '卖家出入库-优软商城';
         $scope.storage_tab = $stateParams.storage_tab? $stateParams.storage_tab : 'inBound';
         $scope.countData = 10;
-        $scope.userInfo = $rootScope.userInfo || {}
-        console.log($stateParams)
+        $scope.userInfo = $rootScope.userInfo || {};
 
+
+        /**
+         * 最大出入库数
+         * @type {number}
+         */
+        $scope.maxReserve = 999999999;
         //数字的正则表达式
         var intPattern = /^[1-9]+$/;
+        $scope.isInt = /^[0-9]*[1-9][0-9]*$/;
 
         // 更多操作数据和记录
         $scope.handleLink = [
@@ -67,6 +73,27 @@ define([ 'app/app' ], function(app) {
             return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
         };
 
+        var getRealLen = function (str) {
+            var len = 0;
+            for (var i = 0; i < str.length; i++) {
+                if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
+                    len += 2;
+                } else {
+                    len++;
+                }
+            }
+            return len;
+        }
+        var cutOutString = function (str, length) {
+            for (var i = 1; i <= str.length; i++) {
+                if (getRealLen(str.substr(0, i)) > length){
+                    str = str.substr(0, i-1);
+                    break;
+                }
+            }
+            return str;
+        };
+
         // 清空数据初始化数据
         var clearRecordParams = function () {
             $scope.dateArea = 'oneMonth'
@@ -80,6 +107,18 @@ define([ 'app/app' ], function(app) {
         };
         clearRecordParams();
 
+        //获取币别信息
+        Enterprise.getCurrencyByRegisterAddress(null, function (data) {
+            if(data.code === 1) {
+                $scope.currency = data.data;
+            }else {
+                toaster.pop('info', '提示', '您公司的注册地址为空,无法确定币别,系统默认为人民币');
+                $scope.currency = 'RMB';
+            }
+        }, function (response) {
+            toaster.pop('info', '提示', '获取不到公司的币别信息');
+        });
+
         // 其它出入库默认数据
         $scope.othenParam = {
             enName: '',
@@ -211,7 +250,6 @@ define([ 'app/app' ], function(app) {
                 total: 0,
                 getData: function ($defer, params) {
                     var param = BaseService.parseParams(params.url())
-                    console.log($scope.keyword, 'keyword')
                     if($scope.keyword){
                         param.keyword = $scope.keyword
                     }
@@ -292,17 +330,22 @@ define([ 'app/app' ], function(app) {
                 return false
             }
             $scope.othenParam.detail = [];
-            console.log($scope.otherData)
-            if(!$scope.othenParam.enName) {
-                toaster.pop('error', '请填写' + ($scope.storage_tab === 'inBound' ? '卖家名称' : '买家名称'));
-                return false
-            }
+            var flag = false;
             angular.forEach($scope.otherData, function(val) {
                 if(val.id) {
-                    $scope.othenParam.detail.push({productId: val.id, qty: 323, price: 4234})
+                    if(val.qty && val.price) {
+                        $scope.othenParam.detail.push({productId: val.id, qty: Number(val.qty), price: Number(val.price)});
+                        flag = true;
+                    }else {
+                        flag = false;
+                    }
                 }
             })
-            Goods.saveOtherProductData({storage_tab: $scope.storage_tab, enName: $scope.othenParam.enName}, $scope.othenParam.detail, function(data) {
+            if(!flag) {
+                toaster.pop('info', '提示', '请正确填写下面的信息内容!');
+                return;
+            }
+            Goods.saveOtherProductData({storage_tab: $scope.storage_tab, enName: $scope.othenParam.enName ? $scope.othenParam.enName : null}, $scope.othenParam.detail, function(data) {
                 if(data.code === 1) {
                     toaster.pop('success', '申请成功!');
                     initOtherData();
@@ -452,7 +495,22 @@ define([ 'app/app' ], function(app) {
         };
 
         //数量进行验证
-        $scope.ChangeSendCount = function(details, val) {
+        $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;
+                    }
+                }
+                item[type] = cutOutString(val, chineseIndex);
+            } else if (val.length > key) {
+                item[type] = cutOutString(val, key);
+            }
+        };
+
+        $scope.outBlurSendCount = function(details, val) {
             var newShipQty = details.shipQty ? details.shipQty : 0
             if (val > details.number - newShipQty) {
                 toaster.pop('warning', '提示', '本次发货数量不能大于已剩数量')
@@ -552,18 +610,6 @@ define([ 'app/app' ], function(app) {
                 toaster.pop('info', '获取定单的信息' + response);
             });
         };
-
-          var getRealLen = function(str) {
-            var len = 0;
-            for (var i = 0; i < str.length; i++) {
-              if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
-                len += 2;
-              } else {
-                len++;
-              }
-            }
-            return len;
-          }
     }]);
 
     // 设置物流公司
@@ -687,7 +733,6 @@ define([ 'app/app' ], function(app) {
 
         $scope.onKeyDown = function () {
             var dom = document.getElementById("ulContent");
-            // console.log(dom.scrollTop);
             if ($scope.showDownFrame && $scope.matchData){
                 if(event.keyCode == 40) { //监听到按下键
                     $scope.selectIndex ++;

+ 84 - 2
src/main/webapp/resources/view/usercenter/forstore/bomListDetail.html

@@ -202,6 +202,9 @@
         padding: 0 10px;
         text-align: center;
     }
+    .com-check-box{
+        cursor:pointer;
+    }
 </style>
 <div class="user_right fr bom-list-detail">
     <a class="back" href="user#/seekPurchase?type=bomManage&bomTab=bomList">&lt;返回BOM列表</a>
@@ -211,8 +214,8 @@
         <button class="operate-btn" ng-click="setEditBom(true)">编辑BOM</button>
         <button class="operate-btn" ng-click="deleteProduct()">删除物料</button>
         <button class="operate-btn" ng-click="deleteBom()">删除本BOM</button>
-        <button class="operate-btn" ng-click="addNewBom()">新增物料</button>
-        <div class="fr" ng-show="editBom || editSeek">
+        <button class="operate-btn" ng-click="addNewMateriel(true)">新增物料</button>
+        <div class="fr" ng-show="editBom || editSeek || addNew">
             <button class="sure-btn" ng-click="sure(true)">确认</button>
             <button class="sure-btn cancel-btn" ng-click="sure(false)">取消</button>
         </div>
@@ -266,6 +269,85 @@
             </tr>
         </thead>
         <tbody>
+            <tr ng-if="addNew" ng-repeat="(key, item) in newMateriel">
+                <td>
+                    <label class="com-check-box" ng-click="newMateriel.splice(key, 1);" ng-if="key !== 0">
+                        <span class="fa fa-close"></span>
+                    </label>
+                </td>
+                <td class="base-info">
+                    <div class="content-line">
+                        <div class="inline-block title">
+                            <i class="must">*</i>品牌:
+                        </div>
+                        <div class="inline-block" ng-class="{'similar-wrap': item.showSimilarBrandList}" title="{{item.brand}}">
+                            <input ng-model="item.brand"
+                                   ng-change="onBrandChange(item)"
+                                   ng-blur="checkBrand(item)"
+                                   type="text">
+                            <ul class="similar-list"
+                                ng-show="item.showSimilarBrandList"
+                                ng-mouseenter="item.isInBrandList = true;"
+                                ng-mouseleave="item.isInBrandList = false">
+                                <li ng-repeat="sBrand in similarBrand" ng-bind="sBrand.nameEn" title="{{sBrand.nameEn}}" ng-click="setBrand(item, sBrand.nameEn)"></li>
+                            </ul>
+                        </div>
+                    </div>
+                    <div class="content-line">
+                        <div class="inline-block title">
+                            <i class="must">*</i>物料名称:
+                        </div>
+                        <div class="inline-block" title="{{item.kind}}">
+                            <input ng-model="item.kind"
+                                   ng-change="onKindChange(item)"
+                                   ng-blur="checkKind(item)"
+                                   type="text">
+                        </div>
+                    </div>
+                </td>
+                <td class="base-info">
+                    <div class="content-line">
+                        <div class="inline-block title">
+                            <i class="must">*</i>型号:
+                        </div>
+                        <div class="inline-block" ng-class="{'similar-wrap': item.showSimilarCodeList}" title="{{item.code}}">
+                            <input ng-model="item.code"
+                                   ng-change="onCodeChange(item)"
+                                   ng-blur="checkCode(item)"
+                                   type="text">
+                            <ul class="similar-list"
+                                ng-show="item.showSimilarCodeList"
+                                ng-mouseenter="item.isInCodeList = true;"
+                                ng-mouseleave="item.isInCodeList = false">
+                                <li ng-repeat="sCode in similarCode" ng-bind="sCode.code" title="{{sCode.code}}" ng-click="setCode(item, sCode.code)"></li>
+                            </ul>
+                        </div>
+                    </div>
+                    <div class="content-line">
+                        <div class="inline-block title">
+                            规格:
+                        </div>
+                        <div class="inline-block" title="{{item.spec}}">
+                            <input ng-model="item.spec"
+                                   ng-change="onSpecChange(item)"
+                                   ng-blur="checkSpec(item)"
+                                   type="text">
+                        </div>
+                    </div>
+                </td>
+                <td class="base-info pcs-line">
+                    <div class="content-line">
+                        <div class="inline-block title">
+                            单位用量:
+                        </div>
+                        <div class="inline-block" title="{{item.amount}}">
+                            <input ng-model="item.amount"
+                                   ng-change="onAmountChange(item)"
+                                   type="text">
+                        </div>
+                    </div>
+                </td>
+            </tr>
             <tr ng-repeat="detail in bomData.seekPurchaseByBatchs track by $index">
                 <td>
                     <label class="com-check-box">

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

@@ -440,9 +440,9 @@
 
 			<div class="sendGoodsList">
 				<li ng-repeat="item in sendGoodsList">
-					<label class="com-check-radio" >
-						<input type="radio" id="autoMonth0" name="date" ng-click="ChooseSendGoodsItem(item, $index)" ng-checked="CheckId === 'autoMonth'+$index">
-						<label style="vertical-align: top" for="autoMonth0"></label>
+					<label class="com-check-radio"   ng-click="ChooseSendGoodsItem(item, $index)">
+						<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>
@@ -563,7 +563,7 @@
 						</span>
 							<span class="wd01" ng-bind="detail.taxUnitprice | formateNumber : 6 | currencySysmbol : detail.currencyName">$1.23</span>
 							<span style="width: 10%;" ng-bind="detail.number">100</span>
-							<span class="wd01 red" ng-bind="detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
+							<span class="wd01 red" style="overflow: hidden;white-space: nowrap;width: 13%" titl="{{detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName}}" ng-bind="detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
 							<!--物料编码-->
 							<span class="wd01" style="line-height: 18px;">
 								<!--<em ng-if="!detail.goodsnumber">&nbsp;</em>-->

+ 9 - 9
src/main/webapp/resources/view/vendor/forstore/purchase_detail.html

@@ -428,7 +428,7 @@
 						<span class="wd01">单价</span>
 						<span style="width: 10%;">数量</span>
 						<span class="wd01">小计</span>
-						<span class="wd01">物料编码</span>
+						<!--<span class="wd01">物料编码</span>-->
 						<span class="wd01">备注</span>
 					</dt>
 					<!--<dd>-->
@@ -509,15 +509,15 @@
 							</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.detailTotal | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
+							<span style="overflow: hidden;white-space: nowrap;width: 15%" 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="overflow: hidden;white-space: nowrap;width: 15%" ng-show="isChange" class="wd01 red" ng-bind="detail.detailTotal | formateNumber : 6 | currencySysmbol : detail.currencyName" title="{{detail.detailTotal | formateNumber : 6 | currencySysmbol : detail.currencyName}}"></span>
 							<!--物料编码-->
-							<span class="wd01" style="line-height: 18px;">
-								<em ng-if="!detail.goodsnumber">&nbsp;</em>
-								<div class="text-area" ng-if="detail.goodsnumber">
-									<i ng-bind="detail.goodsnumber">金石为开取数据五块钱叫稍微亲上加亲</i>
-								</div>
-							</span>
+							<!--<span class="wd01" style="line-height: 18px;">-->
+								<!--<em ng-if="!detail.goodsnumber">&nbsp;</em>-->
+								<!--<div class="text-area" ng-if="detail.goodsnumber">-->
+									<!--<i ng-bind="detail.goodsnumber">金石为开取数据五块钱叫稍微亲上加亲</i>-->
+								<!--</div>-->
+							<!--</span>-->
 							<span class="wd01" style="line-height: 18px;">
 								<em ng-if="!detail.remark">&nbsp;</em>
 								<div class="text-area" ng-if="detail.remark">

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

@@ -650,7 +650,7 @@
         <span>
           <em class="title">订单信息</em>
           <b>订单号:
-            <em ng-bind="::checkinvoice.orid" style="padding-right: 15px;" class="color333"></em>
+            <em ng-bind="::checkinvoice.orderid" style="padding-right: 15px;" class="color333"></em>
             <em>
               <font style="color: #333;">订单状态:</font>
               <em ng-bind="checkinvoice.status | statusAndTypeFilter"></em>

+ 13 - 9
src/main/webapp/resources/view/vendor/forstore/vendor_material.html

@@ -1135,8 +1135,8 @@
 									<div class="overHidden" title="{{material.spec || '-'}}">规格:{{material.spec || '-'}}</div>
 								</td>
 								<td style="text-align: left">
-									<div class="overHidden">包装方式:{{material.packaging || '-'}}</div>
-									<div class="overHidden">最小包装数:{{material.minPackQty || '-'}}</div>
+									<div class="overHidden" title="{{material.packaging || '-'}}">包装方式:{{material.packaging || '-'}}</div>
+									<div class="overHidden" title="{{material.minPackQty || '-'}}">最小包装数:{{material.minPackQty || '-'}}</div>
 									<div class="">
 										<div class="fl">规格书:</div>
 										<div class="Regulpic fl" ng-if="material.productAttachSubmit || material.attach">
@@ -1157,11 +1157,11 @@
 									</div>
 								</td>
 								<td style="text-align: left">
-									<div class="overHidden">成本单价:{{material.price || '-'}}</div>
-									<div class="overHidden">库存数量:{{material.erpReserve || '-'}}</div>
-									<div class="overHidden">最小起订量:{{material.goods.minBuyQty || '-'}}</div>
-									<div class="overHidden" ng-if="material.goods.b2cMinDelivery === material.goods.b2cMaxDelivery">交期(天):{{material.goods.b2cMinDelivery || '-'}}</div>
-									<div class="overHidden" ng-if="material.goods.b2cMinDelivery !== material.goods.b2cMaxDelivery">交期(天):{{material.goods.b2cMinDelivery}} - {{material.goods.b2cMaxDelivery}}</div>
+									<div class="overHidden" title="{{material.price || '-'}}">成本单价:{{material.price || '-'}}</div>
+									<div class="overHidden" title="{{material.erpReserve || '-'}}">库存数量:{{material.erpReserve || '-'}}</div>
+									<div class="overHidden" title="{{material.goods.minBuyQty || '-'}}">最小起订量:{{material.goods.minBuyQty || '-'}}</div>
+									<div class="overHidden" title="{{material.goods.b2cMinDelivery || '-'}}" ng-if="material.goods.b2cMinDelivery === material.goods.b2cMaxDelivery">交期(天):{{material.goods.b2cMinDelivery || '-'}}</div>
+									<div class="overHidden" title="{{material.goods.b2cMinDelivery + '-' +  material.goods.b2cMaxDelivery || '-'}}" ng-if="material.goods.b2cMinDelivery !== material.goods.b2cMaxDelivery">交期(天):{{material.goods.b2cMinDelivery}} - {{material.goods.b2cMaxDelivery}}</div>
 								</td>
 								<td>
 									<ul style="border: 1px solid #dcdcdc; width: 152px;margin: 0 auto">
@@ -1172,9 +1172,13 @@
 										</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.rMBPrice}}</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>
 											<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">
+											暂无数据
+										</li>
 									</ul>
 								</td>
 								<td>
@@ -1457,7 +1461,7 @@
 														</div>
 														<div class="plusBtn" style="font-size: 14px;color: #333;background: #fff;border-top: 1px solid #dcdcdc;position:relative" ng-repeat="price in productUpOff.goods.prices">
 															<span class="fl w50" style="width: 50%;border-right:1px solid #dcdcdc">
-																<input text="text" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" maxlength="8" ng-disabled="$index === 0" ng-readonly="$index === 0" ng-model="price.start" ng-blur="productPriceInfoBlur($index, price.start)" />
+																<input text="text" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" maxlength="9" ng-disabled="$index === 0" ng-readonly="$index === 0" ng-model="price.start" ng-blur="productPriceInfoBlur($index, price.start)" />
 															</span>
 															<span class="fl w50" style="width: 50%">
 																<input text="text" autocomplete="off" validata-price ng-blur="changePrices(productUpOff.goods.prices, price.rMBPrice, $index)" oninput="if(value.length>11)value=value.slice(0,11)" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" ng-model="price.rMBPrice" />

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

@@ -1402,7 +1402,7 @@
                         </span>
 						<span style="text-align: left;" ng-bind="detail.taxUnitPrice | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
 						<span ng-bind="detail.number | number"></span>
-						<span ng-bind="detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName"></span>
+						<span title="{{detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName}}" ng-bind="detail.ensurePrice | formateNumber : 6 | currencySysmbol : detail.currencyName" style="overflow: hidden;white-space: nowrap;"></span>
 						<span class="border01 click_shop">
                             <div ng-if="$index == 0">
                                 <a class="operate-height">

+ 25 - 23
src/main/webapp/resources/view/vendor/forstore/vendor_storage.html

@@ -937,7 +937,7 @@
         white-space: nowrap;
     }
     .wanted_list .wanted-tab tbody>tr>td{
-        padding:0;
+        padding:0 5px;
         line-height: 50px;
         height:50px;
         vertical-align: middle;
@@ -1184,20 +1184,6 @@
                     <label for="autoMonth"></label>
                     自定义
                 </label>
-                <div class="search fr check">
-                    <input type="text" class="form-control" ng-model="keyword" ng-search="onSearch(keyword)" placeholder="{{storage_tab =='outBound' ? '订单号/买家名称' : '发货单/卖家名称'}}"/>
-                    <button ng-click="onSearch(keyword)" style="float: left;">搜索</button>
-                </div>
-            </div>
-            <div class="radio-block">
-                更多操作:
-                <ul class="radio-btn list-inline">
-                    <li ng-repeat="item in handleLink"
-                        ng-bind="item.name"
-                        ng-class="{'active': handleItem === item.id}"
-                        ng-if="item.tab === storage_tab"
-                        ng-click="toggleType(item.id)"></li>
-                </ul>
                 <div class="radio-date" ng-show="dateArea === 'autoMonth'">
                     <div class="data-input">
                         <input id="start" type="text" ng-model="startDate" readonly="readonly"
@@ -1225,6 +1211,20 @@
                     </div>
                 </div>
             </div>
+            <div class="radio-block">
+                更多操作:
+                <ul class="radio-btn list-inline">
+                    <li ng-repeat="item in handleLink"
+                        ng-bind="item.name"
+                        ng-class="{'active': handleItem === item.id}"
+                        ng-if="item.tab === storage_tab"
+                        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' ? '订单号/买家名称' : '发货单/卖家名称'}}"/>
+                    <button ng-click="onSearch(keyword)" style="float: left;">搜索</button>
+                </div>
+            </div>
         </div>
 
         <div class="wanted_list">
@@ -1280,7 +1280,7 @@
                                     <th>物料名称</th>
                                     <th width="210">规格</th>
                                     <th width="130">{{storage_tab === 'inBound' ? '入库数' : '出库数'}}(PCS)</th>
-                                    <th width="130">单价(¥)</th>
+                                    <th width="130">单价({{currency === 'RMB' ? '¥' : '$'}})</th>
                                 </tr>
                                 </thead>
                             </table>
@@ -1326,7 +1326,7 @@
                                 <th>物料名称</th>
                                 <th width="210">规格</th>
                                 <th width="130">{{storage_tab === 'inBound' ? '*入库数' : '*出库数'}}(PCS)</th>
-                                <th width="130">单价(¥)</th>
+                                <th width="130">单价({{currency === 'RMB' ? '¥' : '$'}})</th>
                             </tr>
                             </thead>
                             <tbody>
@@ -1354,8 +1354,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"></td>
-                                <td><input type="text" ng-pattern="/^((\d)|(\d+\.?\d+))$/" class="form-control" ng-model="item.price"></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>
                             </tr>
                             <tr>
                                 <td colspan="7">
@@ -1385,6 +1385,7 @@
                 <tr ng-if="item.seleted && storage_tab === 'outBound'">
                     <td colspan="7" style="background:#f5f5f5;">
                         <div class="logistics-info">
+                            <span style="margin-right:150px;">所属订单:<span ng-bind="item.associateOrderid || '-'"></span></span>
                             <span>物流公司 :&nbsp;</span>
                             <span class="input-ul">
                                 <input id="logistics-input" type="text" class="form-control select-adder" ng-focus="getItemFocus()"
@@ -1398,7 +1399,7 @@
                                   <a ng-click="addDistributor()">+&nbsp;新增配送商</a>
                                 </div>
                               </span>
-                            <span>物流单号 :&nbsp;</span>
+                            <span style="margin-left:100px;">物流单号 :&nbsp;</span>
                             <span style="margin-right: 20px; width: 160px;">
                             <form name="myForm" style="display:inline-block;width:140px;">
                               <!--ng-pattern="/^[A-Za-z0-9]+$/"-->
@@ -1412,9 +1413,10 @@
                 <tr ng-if="item.seleted && storage_tab === 'inBound' && item.logistics">
                     <td colspan="7" style="background:#f5f5f5;">
                         <div class="logistics-info">
+                            <span style="margin-right:150px;">所属订单:<span ng-bind="item.associateOrderid || '-'"></span></span>
                             <span>物流公司 :&nbsp;</span>
                             <span class="input-ul" ng-bind="item.logistics.companyName"></span>
-                            <span>物流单号 :&nbsp;</span>
+                            <span style="margin-left:100px;">物流单号 :&nbsp;</span>
                             <span style="margin-right: 20px;" ng-bind="item.logistics.number">
                             </span>
                         </div>
@@ -1434,7 +1436,7 @@
                                     <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="80">单价(¥)</th>
+                                    <th width="80">单价({{currency === 'RMB' ? '¥' : '$'}})</th>
                                 </tr>
                                 </thead>
                             </table>
@@ -1464,7 +1466,7 @@
                                     <td width="100" ng-if="storage_tab === 'outBound'"><span ng-bind="list.shipQty || '-'" title="{{list.shipQty}}"></span></td>
                                     <td width="100">
                                         <span ng-if="list.number === list.shipQty">-</span>
-                                        <input type="text" ng-pattern="/^[1-9]\d*$/" ng-model="list.sendCount" ng-blur="ontChangeSendCount(list, list.sendCount)" ng-if="list.number !== list.shipQty" class="form-control">
+                                        <input type="text" ng-pattern="/^[1-9]\d*$/" ng-model="list.sendCount" ng-change="onAmountChange(list, list.sendCount, 'sendCount', 9)" ng-blur="outBlurSendCount(list, list.sendCount)" ng-if="list.number !== list.shipQty" class="form-control">
                                     </td>
                                     <td width="80"><span ng-bind="list.price || '-'" title="{{list.price}}"></span></td>
                                 </tr>