Browse Source

1、价格梯度预览时,未填写单价格 添加占位符
2、单个录入 取消按钮 重置页面数据

shenjunjie 7 years ago
parent
commit
40a57c3034

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

@@ -680,9 +680,30 @@ define(['app/app', 'jquery-uploadify'], function(app) {
 
 
     // 新增物料
     // 新增物料
     $scope.initProduct = function() {
     $scope.initProduct = function() {
+        resetPageInfo()
+        $scope.showProductInfo = false
+    }
+
+    // 取消编辑
+    $scope.clearCheckBox = function() {
+      if ($rootScope.singleEntryInfo === true ) {
+        if (confirm('是否放弃本次编辑')) {
+            $rootScope.singleEntryInfo = false
+            resetPageInfo()
+        }
+      } else {
+          resetPageInfo()
+      }
+    }
+
+    // 重置页面数据
+    function resetPageInfo() {
         initInfo()
         initInfo()
         initError()
         initError()
-        $scope.showProductInfo = false
+        var selfSale = ($scope.storeInfo.uuid != 'undefind' && $scope.storeInfo.uuid !== '33069557578d44e69bd91ad12d28a8d4' && ($scope.storeInfo.storeName && $scope.storeInfo.storeName.indexOf('优软测试二') < 0 && $scope.storeInfo.storeName.indexOf('优软商城') < 0)) ? 1: 0
+        $scope.Regul.dateArea = selfSale === 1 ? 'formMe' : 'autoMonth' // 自营还是销售
+        // 销售方式
+        $scope.Regul.selfSale = selfSale
     }
     }
 
 
     // document.addEventListener('click', function() {
     // document.addEventListener('click', function() {

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

@@ -479,7 +479,7 @@
                   <input ng-show="storeInfo.enType === 'HK'" type="text" autocomplete="off" validata-price ng-blur="changePrices(Regul.prices, price.uSDPrice, $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.uSDPrice" />
                   <input ng-show="storeInfo.enType === 'HK'" type="text" autocomplete="off" validata-price ng-blur="changePrices(Regul.prices, price.uSDPrice, $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.uSDPrice" />
                 </span>
                 </span>
                 <span class="fl w50" ng-show="showProductInfo" style="text-align: center">
                 <span class="fl w50" ng-show="showProductInfo" style="text-align: center">
-                  {{price.rMBPrice || price.uSDPrice}}
+                  {{price.rMBPrice || price.uSDPrice || '-'}}
                 </span>
                 </span>
                 <div style="clear:both"></div>
                 <div style="clear:both"></div>
                 <div class="input-list ng-scope" style="height: 24px;line-height: 24px;position: absolute;right: -38px;top: 3px" ng-show="!showProductInfo">
                 <div class="input-list ng-scope" style="height: 24px;line-height: 24px;position: absolute;right: -38px;top: 3px" ng-show="!showProductInfo">