Parcourir la source

Merge branch 'develop' of http://192.168.0.115:3000/xuzhihao/admin-apps into develop

tremble il y a 5 ans
Parent
commit
18980125ec

+ 0 - 2
admins/fd-mall-backstage/WEB-INF/page/shop/goods.html

@@ -85,8 +85,6 @@
                 #end
                 <i-button type="primary" @click="enSale"><i class="fa fa-hand-o-up"></i>&nbsp;上架</i-button>
                 <i-button type="dashed" @click="unSale"><i class="fa fa-hand-o-down"></i>&nbsp;下架</i-button>
-                <i-button type="warning" @click="openPro"><i class="fa fa-pencil-square-o"></i>&nbsp;产品</i-button>
-                <i-button type="warning" @click="openSpe"><i class="fa fa-pencil-square-o"></i>&nbsp;规格</i-button>
             </div>
         </Row>
         <table id="jqGrid"></table>

+ 6 - 13
admins/fd-mall-backstage/js/shop/goods.js

@@ -286,15 +286,6 @@ var vm = new Vue({
 
             this.guigeArr = temp
             this.showArr()
-            // guigeArr:[{
-            //     name:'',
-            //     val:[
-            //         {
-            //             name:'',
-            //             picUrl:''
-            //         }
-            //     ]
-            // }]
         },
         validateGuigeArr: function () {
             var pass = true
@@ -304,7 +295,7 @@ var vm = new Vue({
                 return pass
             }
             this.guigeArr.forEach(function(item) {
-                item.val && item.val.forEach(i => {
+                item.val && item.val.forEach(function (i) {
                     if (!i.name) {
                         layer.alert("规格值请填写完整", {icon: 5});
                         pass = false
@@ -799,9 +790,11 @@ var vm = new Vue({
                 }
                 vm.guigeArr.forEach(function (item) {
                     item.val.forEach(function(i) {
-                        if (!i.name) {
-                            pass = false
-                            alert('商品规格请填写完整')
+                        if (!i.name || !i.picUrl) {
+                            if (pass) {
+                                alert('商品规格请填写完整')
+                                pass = false
+                            }
                         }
                     })
                 })

+ 0 - 2
admins/zl-mall-backstage/WEB-INF/page/shop/goods.html

@@ -85,8 +85,6 @@
                 #end
                 <i-button type="primary" @click="enSale"><i class="fa fa-hand-o-up"></i>&nbsp;上架</i-button>
                 <i-button type="dashed" @click="unSale"><i class="fa fa-hand-o-down"></i>&nbsp;下架</i-button>
-                <i-button type="warning" @click="openPro"><i class="fa fa-pencil-square-o"></i>&nbsp;产品</i-button>
-                <i-button type="warning" @click="openSpe"><i class="fa fa-pencil-square-o"></i>&nbsp;规格</i-button>
             </div>
         </Row>
         <table id="jqGrid"></table>

+ 6 - 13
admins/zl-mall-backstage/js/shop/goods.js

@@ -286,15 +286,6 @@ var vm = new Vue({
 
             this.guigeArr = temp
             this.showArr()
-            // guigeArr:[{
-            //     name:'',
-            //     val:[
-            //         {
-            //             name:'',
-            //             picUrl:''
-            //         }
-            //     ]
-            // }]
         },
         validateGuigeArr: function () {
             var pass = true
@@ -304,7 +295,7 @@ var vm = new Vue({
                 return pass
             }
             this.guigeArr.forEach(function(item) {
-                item.val && item.val.forEach(i => {
+                item.val && item.val.forEach(function (i) {
                     if (!i.name) {
                         layer.alert("规格值请填写完整", {icon: 5});
                         pass = false
@@ -799,9 +790,11 @@ var vm = new Vue({
                 }
                 vm.guigeArr.forEach(function (item) {
                     item.val.forEach(function(i) {
-                        if (!i.name) {
-                            pass = false
-                            alert('商品规格请填写完整')
+                        if (!i.name || !i.picUrl) {
+                            if (pass) {
+                                alert('商品规格请填写完整')
+                                pass = false
+                            }
                         }
                     })
                 })

+ 6 - 13
js/shop/goods.js

@@ -286,15 +286,6 @@ var vm = new Vue({
 
             this.guigeArr = temp
             this.showArr()
-            // guigeArr:[{
-            //     name:'',
-            //     val:[
-            //         {
-            //             name:'',
-            //             picUrl:''
-            //         }
-            //     ]
-            // }]
         },
         validateGuigeArr: function () {
             var pass = true
@@ -304,7 +295,7 @@ var vm = new Vue({
                 return pass
             }
             this.guigeArr.forEach(function(item) {
-                item.val && item.val.forEach(i => {
+                item.val && item.val.forEach(function (i) {
                     if (!i.name) {
                         layer.alert("规格值请填写完整", {icon: 5});
                         pass = false
@@ -799,9 +790,11 @@ var vm = new Vue({
                 }
                 vm.guigeArr.forEach(function (item) {
                     item.val.forEach(function(i) {
-                        if (!i.name) {
-                            pass = false
-                            alert('商品规格请填写完整')
+                        if (!i.name || !i.picUrl) {
+                            if (pass) {
+                                alert('商品规格请填写完整')
+                                pass = false
+                            }
                         }
                     })
                 })