Forráskód Böngészése

编辑bom数据绑定

yangc 7 éve
szülő
commit
ebae6bc5cd

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

@@ -280,15 +280,15 @@
                         <div class="inline-block similar-wrap">
                             <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>
@@ -299,9 +299,9 @@
                         <div class="inline-block">
                             <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>
@@ -314,15 +314,15 @@
                         <div class="inline-block similar-wrap">
                             <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>
@@ -333,9 +333,9 @@
                         <div class="inline-block">
                             <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>
@@ -348,8 +348,8 @@
                         <div class="inline-block">
                             <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>