Browse Source

Merge branch 'feature-201826-wangcz' into release-201826-wangcz

yangc 7 years ago
parent
commit
2a41934635

+ 7 - 6
src/main/webapp/resources/js/usercenter/controllers/forstore/bomListDetailCtrl.js

@@ -232,15 +232,16 @@ define(['app/app'], function(app) {
                 $scope.seekObj.endTime = $scope.seekObj.endTime.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000;
             }
         }
-        // 采购数量临时变量
-        $scope.oldCount = 1;
         // 采购数量输入校验
         $scope.onCountChange = function () {
             // 正整数且小于十万
-            if (!/^[1-9][0-9]*$/.test($scope.seekObj.count) || $scope.seekObj.count >= 100000) {
-                $scope.seekObj.count = $scope.oldCount;
-            } else {
-                $scope.oldCount = $scope.seekObj.count;
+            if (!/^[1-9][0-9]*$/.test($scope.seekObj.count)) {
+                $scope.seekObj.count = 1;
+            }
+            if ($scope.seekObj.count > 99999) {
+                $scope.seekObj.count = 99999;
+            } else if ($scope.seekObj.count < 1) {
+                $scope.seekObj.count = 1;
             }
         }
         // 选中的物料id

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

@@ -435,7 +435,7 @@ define(['app/app', 'clipboard', 'QRCode'], function (app, clipboard, QRCode) {
                 }
 
                 var clearSeekStatus = function () {
-                  angular.forEach($scope.seekListData.content, function (item) {
+                  angular.forEach($scope.bomInfo.inquiryItems, function (item) {
                     item.$status = 0;
                   })
                 }

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

@@ -277,18 +277,18 @@
                         <div class="inline-block title">
                             <i class="must">*</i>品牌:
                         </div>
-                        <div class="inline-block similar-wrap">
+                        <div class="inline-block" ng-class="{'similar-wrap': tmpEditBom.seekPurchaseByBatchs[$index].showSimilarBrandList}" title="{{detail.brand}}">
                             <span ng-show="!editBom || !detail.$checked" ng-bind="detail.brand || '-'"></span>
                             <input ng-show="editBom && detail.$checked"
-                                   ng-model="detail.brand"
-                                   ng-change="onBrandChange(detail)"
-                                   ng-blur="checkBrand(detail)"
+                                   ng-model="tmpEditBom.seekPurchaseByBatchs[$index].brand"
+                                   ng-change="onBrandChange(tmpEditBom.seekPurchaseByBatchs[$index])"
+                                   ng-blur="checkBrand(tmpEditBom.seekPurchaseByBatchs[$index])"
                                    type="text">
                             <ul class="similar-list"
-                                ng-show="detail.showSimilarBrandList"
-                                ng-mouseenter="detail.isInBrandList = true;"
-                                ng-mouseleave="detail.isInBrandList = false">
-                                <li ng-repeat="sBrand in similarBrand" ng-bind="sBrand.nameEn" title="{{sBrand.nameEn}}" ng-click="setBrand(detail, sBrand.nameEn)"></li>
+                                ng-show="tmpEditBom.seekPurchaseByBatchs[$index].showSimilarBrandList"
+                                ng-mouseenter="tmpEditBom.seekPurchaseByBatchs[$index].isInBrandList = true;"
+                                ng-mouseleave="tmpEditBom.seekPurchaseByBatchs[$index].isInBrandList = false">
+                                <li ng-repeat="sBrand in similarBrand" ng-bind="sBrand.nameEn" title="{{sBrand.nameEn}}" ng-click="setBrand(tmpEditBom.seekPurchaseByBatchs[$index], sBrand.nameEn)"></li>
                             </ul>
                         </div>
                     </div>
@@ -296,12 +296,12 @@
                         <div class="inline-block title">
                             <i class="must">*</i>物料名称:
                         </div>
-                        <div class="inline-block">
+                        <div class="inline-block" title="{{detail.kind}}">
                             <span ng-show="!editBom || !detail.$checked" ng-bind="detail.kind || '-'"></span>
                             <input ng-show="editBom && detail.$checked"
-                                   ng-model="detail.kind"
-                                   ng-change="onKindChange(detail)"
-                                   ng-blur="checkKind(detail)"
+                                   ng-model="tmpEditBom.seekPurchaseByBatchs[$index].kind"
+                                   ng-change="onKindChange(tmpEditBom.seekPurchaseByBatchs[$index])"
+                                   ng-blur="checkKind(tmpEditBom.seekPurchaseByBatchs[$index])"
                                    type="text">
                         </div>
                     </div>
@@ -311,18 +311,18 @@
                         <div class="inline-block title">
                             <i class="must">*</i>型号:
                         </div>
-                        <div class="inline-block similar-wrap">
+                        <div class="inline-block" ng-class="{'similar-wrap': tmpEditBom.seekPurchaseByBatchs[$index].showSimilarCodeList}" title="{{detail.code}}">
                             <span ng-show="!editBom || !detail.$checked" ng-bind="detail.code || '-'"></span>
                             <input ng-show="editBom && detail.$checked"
-                                   ng-model="detail.code"
-                                   ng-change="onCodeChange(detail)"
-                                   ng-blur="checkCode(detail)"
+                                   ng-model="tmpEditBom.seekPurchaseByBatchs[$index].code"
+                                   ng-change="onCodeChange(tmpEditBom.seekPurchaseByBatchs[$index])"
+                                   ng-blur="checkCode(tmpEditBom.seekPurchaseByBatchs[$index])"
                                    type="text">
                             <ul class="similar-list"
-                                ng-show="detail.showSimilarCodeList"
-                                ng-mouseenter="detail.isInCodeList = true;"
-                                ng-mouseleave="detail.isInCodeList = false">
-                                <li ng-repeat="sCode in similarCode" ng-bind="sCode.code" title="{{sCode.code}}" ng-click="setCode(detail, sCode.code)"></li>
+                                ng-show="tmpEditBom.seekPurchaseByBatchs[$index].showSimilarCodeList"
+                                ng-mouseenter="tmpEditBom.seekPurchaseByBatchs[$index].isInCodeList = true;"
+                                ng-mouseleave="tmpEditBom.seekPurchaseByBatchs[$index].isInCodeList = false">
+                                <li ng-repeat="sCode in similarCode" ng-bind="sCode.code" title="{{sCode.code}}" ng-click="setCode(tmpEditBom.seekPurchaseByBatchs[$index], sCode.code)"></li>
                             </ul>
                         </div>
                     </div>
@@ -330,12 +330,12 @@
                         <div class="inline-block title">
                             规格:
                         </div>
-                        <div class="inline-block">
+                        <div class="inline-block" title="{{detail.spec}}">
                             <span ng-show="!editBom || !detail.$checked" ng-bind="detail.spec || '-'"></span>
                             <input ng-show="editBom && detail.$checked"
-                                   ng-model="detail.spec"
-                                   ng-change="onSpecChange(detail)"
-                                   ng-blur="checkSpec(detail)"
+                                   ng-model="tmpEditBom.seekPurchaseByBatchs[$index].spec"
+                                   ng-change="onSpecChange(tmpEditBom.seekPurchaseByBatchs[$index])"
+                                   ng-blur="checkSpec(tmpEditBom.seekPurchaseByBatchs[$index])"
                                    type="text">
                         </div>
                     </div>
@@ -345,11 +345,11 @@
                         <div class="inline-block title">
                             单位用量:
                         </div>
-                        <div class="inline-block">
+                        <div class="inline-block" title="{{detail.amount}}">
                             <span ng-show="!editBom || !detail.$checked" ng-bind="detail.amount || '-'"></span>
                             <input ng-show="editBom && detail.$checked"
-                                   ng-model="detail.amount"
-                                   ng-change="onAmountChange(detail)"
+                                   ng-model="tmpEditBom.seekPurchaseByBatchs[$index].amount"
+                                   ng-change="onAmountChange(tmpEditBom.seekPurchaseByBatchs[$index])"
                                    type="text">
                         </div>
                     </div>