Merge branch 'develop' of git.dev.yoho.cn:platform/yohobuy-portal-fe into develop
Showing
15 changed files
with
53 additions
and
148 deletions
@@ -51,8 +51,12 @@ var ENUM={ | @@ -51,8 +51,12 @@ var ENUM={ | ||
51 | } | 51 | } |
52 | 52 | ||
53 | /*下拉选择*/ | 53 | /*下拉选择*/ |
54 | -new common.dropDown({el:"#shopId",ajax:"queryShopPass"}); | ||
55 | new common.dropDown({el:"#brandId",ajax:"queryBrand"}); | 54 | new common.dropDown({el:"#brandId",ajax:"queryBrand"}); |
55 | + | ||
56 | +new common.dropDown({el:"#shopId",ajax:"queryShopPass",param:function(){ | ||
57 | + return {brandId:$("#brandId").val()} | ||
58 | +}}); | ||
59 | + | ||
56 | new common.dropDown({el:"#supplierId",ajax:"querySupplier"}); | 60 | new common.dropDown({el:"#supplierId",ajax:"querySupplier"}); |
57 | 61 | ||
58 | var e=new common.edit("#basicInfo"); | 62 | var e=new common.edit("#basicInfo"); |
@@ -5,15 +5,15 @@ var $ = require('jquery'); | @@ -5,15 +5,15 @@ var $ = require('jquery'); | ||
5 | var urlObj = { | 5 | var urlObj = { |
6 | 'supplier': '/supplier/supplier/getSupplierListByIdName', | 6 | 'supplier': '/supplier/supplier/getSupplierListByIdName', |
7 | 'brand': '/brand/getBrandNames', | 7 | 'brand': '/brand/getBrandNames', |
8 | - 'managerName': '/supplier/storeadmin/managerName', | 8 | + 'managerName': '/supplier/storeadmin/managerName',//根据身份选择管理员 |
9 | 'sortattribute': '/erpproduct/sortattribute/ajax/automatic', // 品类关联实物测量属性 | 9 | 'sortattribute': '/erpproduct/sortattribute/ajax/automatic', // 品类关联实物测量属性 |
10 | - 'sortsize': '/erpproduct/sortsize/ajax/automatic', | ||
11 | - 'queryBrand': '/goods/query/brand', | ||
12 | - 'querySupplier': '/goods/query/supplier', | ||
13 | - 'queryShop': '/goods/query/shop', // 获取店铺 | ||
14 | - 'queryShopPass': '/goods/query/shopPass', // 获取通过审核的店铺 | ||
15 | - 'maxSort': '/goods/query/maxSort', | ||
16 | - 'shopsRest': '/ShopsRest/getShopsByName', | 10 | + 'sortsize': '/erpproduct/sortsize/ajax/automatic',//尺码模糊查询【验证通过】 |
11 | + 'queryBrand': '/goods/query/brand',//查询品牌列表接口 | ||
12 | + 'querySupplier': '/goods/query/supplier',//查询供应商列表接口 | ||
13 | + 'queryShop': '/goods/query/shop', // 查询店铺列表接口 | ||
14 | + 'queryShopPass': '/goods/query/shopPass', // 查询通过审核店铺列表接口 | ||
15 | + 'maxSort': '/goods/query/maxSort',//查询一级类目列表接口 | ||
16 | + 'shopsRest': '/ShopsRest/getShopsByName', // 店铺列表 | ||
17 | 'sortlist': '/product/class/queryAllProductSortList', | 17 | 'sortlist': '/product/class/queryAllProductSortList', |
18 | 'productPool': '/runManage/subjectManage/queryBaseProductPoolListByName', | 18 | 'productPool': '/runManage/subjectManage/queryBaseProductPoolListByName', |
19 | 'firstCategory': '/operations/helpcategory/getCategoryListByPid', | 19 | 'firstCategory': '/operations/helpcategory/getCategoryListByPid', |
@@ -48,6 +48,10 @@ dropDown.prototype = { | @@ -48,6 +48,10 @@ dropDown.prototype = { | ||
48 | type: 'POST', | 48 | type: 'POST', |
49 | delay: 250, | 49 | delay: 250, |
50 | data: function(params) { | 50 | data: function(params) { |
51 | + if(Object.prototype.toString.call(option.params)=="[object Function]"){ | ||
52 | + option.params=option.params(); | ||
53 | + } | ||
54 | + | ||
51 | var data = $.extend({}, { | 55 | var data = $.extend({}, { |
52 | idName: params.term | 56 | idName: params.term |
53 | }, option.params || {}); | 57 | }, option.params || {}); |
@@ -177,10 +177,11 @@ $(document).on("change", ".poseditimg .pos-text", function() { | @@ -177,10 +177,11 @@ $(document).on("change", ".poseditimg .pos-text", function() { | ||
177 | //添加 | 177 | //添加 |
178 | $(document).on("click", "#dapeiadd", function() { | 178 | $(document).on("click", "#dapeiadd", function() { |
179 | Bll.toast("添加搭配", {}, "/netSale/insertCollocation"); | 179 | Bll.toast("添加搭配", {}, "/netSale/insertCollocation"); |
180 | + return false; | ||
180 | }); | 181 | }); |
181 | //保存 | 182 | //保存 |
182 | $(document).on("click", "#dapeisave", function() { | 183 | $(document).on("click", "#dapeisave", function() { |
183 | - | 184 | + //添加的时候已经保存 |
184 | }); | 185 | }); |
185 | //删除 | 186 | //删除 |
186 | $(document).on("click", "#dapeiTable .delete", function() { | 187 | $(document).on("click", "#dapeiTable .delete", function() { |
@@ -212,13 +213,13 @@ $(document).on("click", "#dapeiTable .edit", function() { | @@ -212,13 +213,13 @@ $(document).on("click", "#dapeiTable .edit", function() { | ||
212 | 213 | ||
213 | 214 | ||
214 | /*封面设置*/ | 215 | /*封面设置*/ |
215 | -var goodsImagesList = {}; | ||
216 | -if (window.NETSALEDATA && window.NETSALEDATA.goodsImagesList) { | ||
217 | - goodsImagesList = window.NETSALEDATA.goodsImagesList; | 216 | +var goodsList = {}; |
217 | +if (window.NETSALEDATA && window.NETSALEDATA.goodsList) { | ||
218 | + goodsList = window.NETSALEDATA.goodsList; | ||
218 | } | 219 | } |
219 | -console.log("封面设置", goodsImagesList); | 220 | +console.log("封面设置", goodsList); |
220 | $("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), { | 221 | $("#fenmianWrap").html(common.util.__template2($("#fenmianTemp").html(), { |
221 | - goodsImagesList: goodsImagesList | 222 | + goodsList: goodsList |
222 | })); | 223 | })); |
223 | common.edit.ajaxfileupload("#fenmianfile", { | 224 | common.edit.ajaxfileupload("#fenmianfile", { |
224 | params: { | 225 | params: { |
@@ -228,14 +229,14 @@ common.edit.ajaxfileupload("#fenmianfile", { | @@ -228,14 +229,14 @@ common.edit.ajaxfileupload("#fenmianfile", { | ||
228 | valid_extensions: ['gif', 'png', 'jpg', 'jpeg'], | 229 | valid_extensions: ['gif', 'png', 'jpg', 'jpeg'], |
229 | onComplete: function(response) { | 230 | onComplete: function(response) { |
230 | if (response.status && response.code == 200) { | 231 | if (response.status && response.code == 200) { |
231 | - var item = goodsImagesList[$(this).data("index")].goodsImagesList; | 232 | + var item = goodsList[$(this).data("index")].goodsImagesList; |
232 | var data = { | 233 | var data = { |
233 | "angle": 0, | 234 | "angle": 0, |
234 | "genderCover": 0, | 235 | "genderCover": 0, |
235 | "imageUrl": response.data, | 236 | "imageUrl": response.data, |
236 | "orderBy": item.length, | 237 | "orderBy": item.length, |
237 | - "productSkc": goodsImagesList[$(this).data("index")].productSkc, | ||
238 | - "productSkn": goodsImagesList[$(this).data("index")].productSkn, | 238 | + "productSkc": goodsList[$(this).data("index")].productSkc, |
239 | + "productSkn": goodsList[$(this).data("index")].productSkn, | ||
239 | "__index": item.length, | 240 | "__index": item.length, |
240 | "index": $(this).data("index") | 241 | "index": $(this).data("index") |
241 | }; | 242 | }; |
@@ -251,7 +252,7 @@ common.edit.ajaxfileupload("#fenmianfile", { | @@ -251,7 +252,7 @@ common.edit.ajaxfileupload("#fenmianfile", { | ||
251 | $(document).on("click", ".cover-color .btn-metro", function() { | 252 | $(document).on("click", ".cover-color .btn-metro", function() { |
252 | var index = $(this).parents("ul").data("index"); | 253 | var index = $(this).parents("ul").data("index"); |
253 | var index1 = $(this).parents(".cover-image-item").data("index"); | 254 | var index1 = $(this).parents(".cover-image-item").data("index"); |
254 | - var item = goodsImagesList[index].goodsImagesList[index1]; | 255 | + var item = goodsList[index].goodsImagesList[index1]; |
255 | if ($(this).hasClass("info")) { | 256 | if ($(this).hasClass("info")) { |
256 | $(this).removeClass("info"); | 257 | $(this).removeClass("info"); |
257 | } else { | 258 | } else { |
@@ -265,7 +266,7 @@ $(document).on("click", ".cover-color .btn-metro", function() { | @@ -265,7 +266,7 @@ $(document).on("click", ".cover-color .btn-metro", function() { | ||
265 | }); | 266 | }); |
266 | $(document).on("click", ".goods-color a", function() { | 267 | $(document).on("click", ".goods-color a", function() { |
267 | var index = $(this).data("index"); | 268 | var index = $(this).data("index"); |
268 | - var item = goodsImagesList[index]; | 269 | + var item = goodsList[index]; |
269 | if ($(this).hasClass("info")) { | 270 | if ($(this).hasClass("info")) { |
270 | $(this).removeClass("info"); | 271 | $(this).removeClass("info"); |
271 | } else { | 272 | } else { |
@@ -301,4 +302,6 @@ GOLABDATA.on("fenmian", function() { | @@ -301,4 +302,6 @@ GOLABDATA.on("fenmian", function() { | ||
301 | return { | 302 | return { |
302 | "goodsImagesReq": JSON.stringify(map) | 303 | "goodsImagesReq": JSON.stringify(map) |
303 | } | 304 | } |
304 | -}); | ||
305 | +}); | ||
306 | + | ||
307 | + |
@@ -42,7 +42,7 @@ var $ = require('jquery'); | @@ -42,7 +42,7 @@ var $ = require('jquery'); | ||
42 | onClick:function(url, item, hint) { | 42 | onClick:function(url, item, hint) { |
43 | var e = new common.edit("#baseform"); | 43 | var e = new common.edit("#baseform"); |
44 | 44 | ||
45 | - // console.log(item); | 45 | + console.log(item); |
46 | common.dialog.confirm(hint, | 46 | common.dialog.confirm(hint, |
47 | common.util.__template($("#template").html(), item), | 47 | common.util.__template($("#template").html(), item), |
48 | function() { | 48 | function() { |
@@ -72,7 +72,7 @@ var $ = require('jquery'); | @@ -72,7 +72,7 @@ var $ = require('jquery'); | ||
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | - },true); | 75 | + }); |
76 | } | 76 | } |
77 | } | 77 | } |
78 | 78 |
@@ -14,20 +14,7 @@ exports.res = [ | @@ -14,20 +14,7 @@ exports.res = [ | ||
14 | bottons:'{"edit":true}', | 14 | bottons:'{"edit":true}', |
15 | gridurl:'/brand/getBrandList' | 15 | gridurl:'/brand/getBrandList' |
16 | }, | 16 | }, |
17 | - }, { | ||
18 | - route: '/brand/getBrandNames', | ||
19 | - method: 'POST', | ||
20 | - url: '/erpproduct/brands/getBrandNames', | ||
21 | - params: [ | ||
22 | - { | ||
23 | - name: 'idName', | ||
24 | - type: 'String' | ||
25 | - },{ | ||
26 | - name:'status', | ||
27 | - type:'Number' | ||
28 | - } | ||
29 | - ] | ||
30 | - }, { | 17 | + }, { |
31 | //品牌管理 -> 列表ajax | 18 | //品牌管理 -> 列表ajax |
32 | route: '/brand/getBrandList', | 19 | route: '/brand/getBrandList', |
33 | method: 'POST', | 20 | method: 'POST', |
@@ -571,52 +571,7 @@ exports.res = [ | @@ -571,52 +571,7 @@ exports.res = [ | ||
571 | name: 'param', | 571 | name: 'param', |
572 | type: 'Number' | 572 | type: 'Number' |
573 | }] | 573 | }] |
574 | - }, { | ||
575 | - //查询店铺列表接口 | ||
576 | - route: '/goods/query/shop', | ||
577 | - method: 'POST', | ||
578 | - url: '/ShopsRest/queryAllShops', | ||
579 | - params: [{ | ||
580 | - name: 'idName', | ||
581 | - type: 'String' | ||
582 | - }] | ||
583 | - }, { | ||
584 | - //查询通过审核店铺列表接口 | ||
585 | - route: '/goods/query/shopPass', | ||
586 | - method: 'POST', | ||
587 | - url: '/ShopsRest/selectCheckPassShopsByName', | ||
588 | - params: [{ | ||
589 | - name: 'idName', | ||
590 | - type: 'String' | ||
591 | - }] | ||
592 | - }, { | ||
593 | - //查询品牌列表接口 | ||
594 | - route: '/goods/query/brand', | ||
595 | - method: 'POST', | ||
596 | - url: '/erpproduct/brands/queryAllBrands', | ||
597 | - params: [{ | ||
598 | - name: 'idName', | ||
599 | - type: 'String' | ||
600 | - }] | ||
601 | - }, { | ||
602 | - //查询供应商列表接口 | ||
603 | - route: '/goods/query/supplier', | ||
604 | - method: 'POST', | ||
605 | - url: '/supplier/supplier/queryAllSupplier', | ||
606 | - params: [{ | ||
607 | - name: 'idName', | ||
608 | - type: 'String' | ||
609 | - }] | ||
610 | - }, { | ||
611 | - //查询一级类目列表接口 | ||
612 | - route: '/goods/query/maxSort', | ||
613 | - method: 'POST', | ||
614 | - url: '/product/queryMaxSortByName', | ||
615 | - params: [{ | ||
616 | - name: 'idName', | ||
617 | - type: 'String' | ||
618 | - }] | ||
619 | - }, { | 574 | + },{ |
620 | //单个变价接口 | 575 | //单个变价接口 |
621 | route: '/goods/updatePrice', | 576 | route: '/goods/updatePrice', |
622 | method: 'POST', | 577 | method: 'POST', |
@@ -224,13 +224,6 @@ exports.res = [{ | @@ -224,13 +224,6 @@ exports.res = [{ | ||
224 | name: 'type', | 224 | name: 'type', |
225 | type: 'String' | 225 | type: 'String' |
226 | }] | 226 | }] |
227 | -},{//模糊查询 | ||
228 | - route:'/limit/xiangouID/selectActivityListForSelect', | ||
229 | - method:'POST', | ||
230 | - url:'/DrawlineActivityRest/selectActivityListForSelect', | ||
231 | - params:[ | ||
232 | - {name:"idName",type:'String'} | ||
233 | - ] | ||
234 | },{ | 227 | },{ |
235 | route:'/limit/DrawlineActivityRest/checkActivityIdExists', | 228 | route:'/limit/DrawlineActivityRest/checkActivityIdExists', |
236 | method:'POST', | 229 | method:'POST', |
1 | -exports.domain = require('../config/common.js').domain; | ||
2 | -// exports.domain = 'http://172.16.6.227:8084/yohobuy-platform-web'; | 1 | +// exports.domain = require('../config/common.js').domain; |
2 | +exports.domain = 'http://172.16.6.227:8084/yohobuy-platform-web'; | ||
3 | exports.res = [ | 3 | exports.res = [ |
4 | //商品描述 | 4 | //商品描述 |
5 | { | 5 | { |
@@ -38,15 +38,7 @@ exports.res = [ | @@ -38,15 +38,7 @@ exports.res = [ | ||
38 | {name:"orderBy",type:"number"} | 38 | {name:"orderBy",type:"number"} |
39 | ] | 39 | ] |
40 | }, | 40 | }, |
41 | - {//尺码模糊查询【验证通过】 | ||
42 | - route:'/erpproduct/sortsize/ajax/automatic', | ||
43 | - method:'POST', | ||
44 | - url: '/product/querySizeByNameForSelect', | ||
45 | - params:[ | ||
46 | - {name:"idName",type:"String"}, | ||
47 | - {name:"sortId",type:"Number"} | ||
48 | - ] | ||
49 | - }, | 41 | + |
50 | {//删除单个品类尺码接口【待验证】 | 42 | {//删除单个品类尺码接口【待验证】 |
51 | route: '/erpproduct/sortsize/ajax/delete', | 43 | route: '/erpproduct/sortsize/ajax/delete', |
52 | method: 'POST', | 44 | method: 'POST', |
@@ -103,14 +95,5 @@ exports.res = [ | @@ -103,14 +95,5 @@ exports.res = [ | ||
103 | {name:"attributeId",type:"number"}, | 95 | {name:"attributeId",type:"number"}, |
104 | {name:"orderBy",type:"number"} | 96 | {name:"orderBy",type:"number"} |
105 | ] | 97 | ] |
106 | - },{//添加品类关联尺码属性接口【验证通过】 | ||
107 | - route: '/erpproduct/sortattribute/ajax/automatic', | ||
108 | - method: 'POST', | ||
109 | - url: '/product/querySizeAttributesByName', | ||
110 | - params:[ | ||
111 | - {name:"idName",type:"String"}, | ||
112 | - {name:"sortId",type:"Number"} | ||
113 | - | ||
114 | - ] | ||
115 | } | 98 | } |
116 | ] | 99 | ] |
@@ -287,16 +287,6 @@ exports.res = [ | @@ -287,16 +287,6 @@ exports.res = [ | ||
287 | {name:"identity",type:"Number"} | 287 | {name:"identity",type:"Number"} |
288 | ] | 288 | ] |
289 | },{ | 289 | },{ |
290 | - // 根据身份选择管理员 | ||
291 | - route: '/supplier/storeadmin/managerName', | ||
292 | - method: 'POST', | ||
293 | - url:"/ShopsAdminRest/getUsersByIdentity", | ||
294 | - src:'/store/adminedit', | ||
295 | - params:[ | ||
296 | - {name:"identity",type:"Number"}, | ||
297 | - {name:"shopsId",type:"Number"} | ||
298 | - ] | ||
299 | - },{ | ||
300 | // 根据品牌选择供应商 | 290 | // 根据品牌选择供应商 |
301 | route: '/supplier/storeadmin/supplierlist', | 291 | route: '/supplier/storeadmin/supplierlist', |
302 | method: 'POST', | 292 | method: 'POST', |
@@ -304,14 +294,6 @@ exports.res = [ | @@ -304,14 +294,6 @@ exports.res = [ | ||
304 | params:[ | 294 | params:[ |
305 | {name:"brandId",type:"Number"} | 295 | {name:"brandId",type:"Number"} |
306 | ] | 296 | ] |
307 | - },{ | ||
308 | - // 店铺列表 | ||
309 | - route: '/ShopsRest/getShopsByName', | ||
310 | - method: 'POST', | ||
311 | - url:"/ShopsRest/selectCheckPassShopsByName", | ||
312 | - params:[ | ||
313 | - {name:"idName",type:"String"} | ||
314 | - ] | ||
315 | } | 297 | } |
316 | ] | 298 | ] |
317 | 299 |
@@ -249,14 +249,6 @@ exports.res = [ | @@ -249,14 +249,6 @@ exports.res = [ | ||
249 | type: 'String' | 249 | type: 'String' |
250 | } | 250 | } |
251 | ] | 251 | ] |
252 | - }, | ||
253 | - //************************************* | ||
254 | - { | ||
255 | - route:'/supplier/supplier/getSupplierListByIdName', | ||
256 | - method:'POST', | ||
257 | - url: '/supplier/supplier/getSupplierListByIdName', | ||
258 | - params:[ | ||
259 | - {name:"idName",type:"String",def: 1} | ||
260 | - ] | ||
261 | } | 252 | } |
253 | + | ||
262 | ] | 254 | ] |
1 | -exports.staticDir = {"test":{"path":"/dist"},"preview":{"path":"http://cdn.yoho.cn/yohobuy-portal/0.2.2","md5":""},"production":{"path":"http://cdn.yoho.cn/yohobuy-portal/0.2.2","md5":""}} | ||
1 | +exports.staticDir = {"test":{"path":"/dist"},"preview":{"path":"http://cdn.yoho.cn/yohobuy-portal/0.2.3","md5":""},"production":{"path":"http://cdn.yoho.cn/yohobuy-portal/0.2.3","md5":""}} |
@@ -104,23 +104,25 @@ | @@ -104,23 +104,25 @@ | ||
104 | <div class="row"> | 104 | <div class="row"> |
105 | 105 | ||
106 | <div class="form-group"> | 106 | <div class="form-group"> |
107 | - <label class="col-sm-2 control-label">店铺 <span class="red">*</span></label> | 107 | + <label class="col-sm-2 control-label">品牌 <span class="red">*</span></label> |
108 | <div class="col-sm-2"> | 108 | <div class="col-sm-2"> |
109 | - <select id="shopId" class="form-control" required> | ||
110 | - <option value="[[shopId||'-1']]">[[shopName||'店铺']]</option> | 109 | + <select id="brandId" class="form-control" required> |
110 | + <option value="[[brandId||'-1']]">[[brandName||'品牌']]</option> | ||
111 | </select> | 111 | </select> |
112 | </div> | 112 | </div> |
113 | 113 | ||
114 | - <label class="col-sm-1 control-label">品牌 <span class="red">*</span></label> | 114 | + <label class="col-sm-1 control-label">店铺 </label> |
115 | <div class="col-sm-2"> | 115 | <div class="col-sm-2"> |
116 | - <select id="brandId" class="form-control" required> | ||
117 | - <option value="[[brandId||'-1']]">[[brandName||'品牌']]</option> | 116 | + <select id="shopId" class="form-control"> |
117 | + <option value="[[shopId||'-1']]">[[shopName||'店铺']]</option> | ||
118 | </select> | 118 | </select> |
119 | </div> | 119 | </div> |
120 | + | ||
121 | + | ||
120 | 122 | ||
121 | - <label class="col-sm-1 control-label">供应商 <span class="red">*</span></label> | 123 | + <label class="col-sm-1 control-label">供应商</label> |
122 | <div class="col-sm-2"> | 124 | <div class="col-sm-2"> |
123 | - <select id="supplierId" class="form-control" required> | 125 | + <select id="supplierId" class="form-control"> |
124 | <option value="[[supplierId||'-1']]">[[supplierName||'供应商']]</option> | 126 | <option value="[[supplierId||'-1']]">[[supplierName||'供应商']]</option> |
125 | </select> | 127 | </select> |
126 | </div> | 128 | </div> |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | </div> | 15 | </div> |
16 | </div> | 16 | </div> |
17 | <script type="text/template" id="fenmianTemp"> | 17 | <script type="text/template" id="fenmianTemp"> |
18 | -[[each goodsImagesList as item index]] | 18 | +[[each goodsList as item index]] |
19 | <div class="form-group"> | 19 | <div class="form-group"> |
20 | <div class="col-sm-1"> | 20 | <div class="col-sm-1"> |
21 | <div class="goods-img"> | 21 | <div class="goods-img"> |
-
Please register or login to post a comment