|
|
@@ -680,9 +680,30 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
|
|
|
// 新增物料
|
|
|
$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()
|
|
|
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() {
|