Showing
6 changed files
with
408 additions
and
106 deletions
@@ -71,6 +71,15 @@ GOLABDATA.on("LYaddInfo", function() { | @@ -71,6 +71,15 @@ GOLABDATA.on("LYaddInfo", function() { | ||
71 | }); | 71 | }); |
72 | }); | 72 | }); |
73 | 73 | ||
74 | +function inputDisabled(callback) { | ||
75 | + if ($('.contentpanel').data('type') == 'info') { | ||
76 | + $('.contentpanel').find('input').prop('disabled', true); | ||
77 | + $('.contentpanel').find('select').prop('disabled', true); | ||
78 | + $('.contentpanel').find('.btn').addClass('disabled'); | ||
79 | + callback && callback(); | ||
80 | + } | ||
81 | +} | ||
82 | + | ||
74 | $.ajax({ | 83 | $.ajax({ |
75 | type: 'POST', | 84 | type: 'POST', |
76 | url: '/goods/product/queryAttributesByConf', | 85 | url: '/goods/product/queryAttributesByConf', |
@@ -151,12 +160,9 @@ $.ajax({ | @@ -151,12 +160,9 @@ $.ajax({ | ||
151 | 160 | ||
152 | e.init(); | 161 | e.init(); |
153 | 162 | ||
154 | - if ($('.contentpanel').data('type') == 'info') { | ||
155 | - $('.contentpanel').find('input').prop('disabled', true); | ||
156 | - $('.contentpanel').find('select').prop('disabled', true); | ||
157 | - $('.contentpanel').find('.btn').addClass('disabled'); | 163 | + inputDisabled(function() { |
158 | $('#addinfo-wrap').find('input').not(":checked").parents('label').hide(); | 164 | $('#addinfo-wrap').find('input').not(":checked").parents('label').hide(); |
159 | - } | 165 | + }); |
160 | 166 | ||
161 | } | 167 | } |
162 | }); | 168 | }); |
@@ -241,48 +247,44 @@ $('#editProductName').on('click', function() { | @@ -241,48 +247,44 @@ $('#editProductName').on('click', function() { | ||
241 | // }); | 247 | // }); |
242 | 248 | ||
243 | 249 | ||
244 | - | 250 | +var common_columns = [{ |
251 | + display: "名称", | ||
252 | + width: '10%', | ||
253 | + name: "attributeName", | ||
254 | + render: function(item) { | ||
255 | + item.required = item.isMust == "Y" ? "required" : ""; | ||
256 | + var arr = []; | ||
257 | + arr.push(item.attributeName); | ||
258 | + if (item.required) { | ||
259 | + arr.push("<span class='red'>*</span>"); | ||
260 | + } | ||
261 | + return arr.join(''); | ||
262 | + } | ||
263 | +}] | ||
245 | /*陈超*/ | 264 | /*陈超*/ |
246 | 265 | ||
247 | var ag = new common.grid({ | 266 | var ag = new common.grid({ |
248 | el: "#attributeTable", | 267 | el: "#attributeTable", |
249 | - columns: [{ | ||
250 | - display: "名称", | ||
251 | - name: "attributeName", | ||
252 | - render: function(item) { | ||
253 | - item.required = item.isMust == "Y" ? "required" : ""; | ||
254 | - var arr = []; | ||
255 | - arr.push(item.attributeName); | ||
256 | - if (item.required) { | ||
257 | - arr.push("<span class='red'>*</span>"); | ||
258 | - } | ||
259 | - return arr.join(''); | ||
260 | - } | ||
261 | - }, { | 268 | + hash: false, |
269 | + columns: common_columns.concat([{ | ||
262 | display: "属性", | 270 | display: "属性", |
263 | render: function(item) { | 271 | render: function(item) { |
264 | item.required = item.isMust == "Y" ? "required" : ""; | 272 | item.required = item.isMust == "Y" ? "required" : ""; |
265 | - // item.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){ | ||
266 | - // return {name:elem} | ||
267 | - // }); | ||
268 | 273 | ||
269 | var attrs = NETSALEDATA.productStandardRelationBoList; | 274 | var attrs = NETSALEDATA.productStandardRelationBoList; |
270 | if (attrs) { | 275 | if (attrs) { |
271 | for (var i in attrs) { | 276 | for (var i in attrs) { |
272 | if (attrs[i].standardId == item.attributeId) { | 277 | if (attrs[i].standardId == item.attributeId) { |
273 | - item.val = attrs[i].standardVal; | 278 | + item.val = attrs[i].parameterMakeId; |
274 | item.__val = attrs[i].parameterMakeId; | 279 | item.__val = attrs[i].parameterMakeId; |
275 | } | 280 | } |
276 | } | 281 | } |
277 | } | 282 | } |
278 | 283 | ||
279 | - // item.attributeValues={name:}; | 284 | + item.__name = "attributeTable"; |
280 | return common.util.__template2($("#template33").html(), item); | 285 | return common.util.__template2($("#template33").html(), item); |
281 | } | 286 | } |
282 | - }, { | ||
283 | - display: "备注", | ||
284 | - name: "remark" | ||
285 | - }], | 287 | + }]), |
286 | complete: function() { | 288 | complete: function() { |
287 | ag.__edit.init(); | 289 | ag.__edit.init(); |
288 | } | 290 | } |
@@ -297,6 +299,9 @@ common.util.__ajax({ | @@ -297,6 +299,9 @@ common.util.__ajax({ | ||
297 | } | 299 | } |
298 | }, function(res) { | 300 | }, function(res) { |
299 | ag.init(res.data); | 301 | ag.init(res.data); |
302 | + inputDisabled(function() { | ||
303 | + $('#attributeTable').find('input').not(":checked").parents('label').hide(); | ||
304 | + }); | ||
300 | }, true); | 305 | }, true); |
301 | 306 | ||
302 | 307 | ||
@@ -305,43 +310,25 @@ common.util.__ajax({ | @@ -305,43 +310,25 @@ common.util.__ajax({ | ||
305 | console.log("attributeProValuesBosOne", NETSALEDATA.attributeProValuesBosOne); | 310 | console.log("attributeProValuesBosOne", NETSALEDATA.attributeProValuesBosOne); |
306 | var ag2 = new common.grid({ | 311 | var ag2 = new common.grid({ |
307 | el: "#goodsParamWrap", | 312 | el: "#goodsParamWrap", |
308 | - columns: [{ | ||
309 | - display: "名称", | ||
310 | - name: "attributeName", | ||
311 | - render: function(item) { | ||
312 | - item.required = item.isMust == "Y" ? "required" : ""; | ||
313 | - var arr = []; | ||
314 | - arr.push(item.attributeName); | ||
315 | - if (item.required) { | ||
316 | - arr.push("<span class='red'>*</span>"); | ||
317 | - } | ||
318 | - return arr.join(''); | ||
319 | - } | ||
320 | - }, { | 313 | + hash: false, |
314 | + columns: common_columns.concat([{ | ||
321 | display: "属性", | 315 | display: "属性", |
322 | render: function(item) { | 316 | render: function(item) { |
323 | item.required = item.isMust == "Y" ? "required" : ""; | 317 | item.required = item.isMust == "Y" ? "required" : ""; |
324 | item.id = item.parameterMakeId; | 318 | item.id = item.parameterMakeId; |
325 | - // item.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){ | ||
326 | - // return {name:elem} | ||
327 | - // }); | ||
328 | var attrs = NETSALEDATA.attributeProValuesBosOne; | 319 | var attrs = NETSALEDATA.attributeProValuesBosOne; |
329 | if (attrs) { | 320 | if (attrs) { |
330 | for (var i in attrs) { | 321 | for (var i in attrs) { |
331 | if (attrs[i].attributeId == item.attributeId) { | 322 | if (attrs[i].attributeId == item.attributeId) { |
332 | - item.val = attrs[i].standardVal; | 323 | + item.val = attrs[i].attributeValueId; |
333 | item.__val = attrs[i].attributeValueId.replace(/,/g, '|'); | 324 | item.__val = attrs[i].attributeValueId.replace(/,/g, '|'); |
334 | } | 325 | } |
335 | } | 326 | } |
336 | } | 327 | } |
337 | - | ||
338 | - // item.attributeValues={name:}; | 328 | + item.__name = "goodsParamWrap"; |
339 | return common.util.__template2($("#template33").html(), item); | 329 | return common.util.__template2($("#template33").html(), item); |
340 | } | 330 | } |
341 | - }, { | ||
342 | - display: "备注", | ||
343 | - name: "remark" | ||
344 | - }], | 331 | + }]), |
345 | complete: function() { | 332 | complete: function() { |
346 | ag2.__edit.init(); | 333 | ag2.__edit.init(); |
347 | } | 334 | } |
@@ -358,21 +345,70 @@ common.util.__ajax({ | @@ -358,21 +345,70 @@ common.util.__ajax({ | ||
358 | }, function(res) { | 345 | }, function(res) { |
359 | console.log("res.data", res.data); | 346 | console.log("res.data", res.data); |
360 | ag2.init(res.data); | 347 | ag2.init(res.data); |
348 | + inputDisabled(function() { | ||
349 | + $('#goodsParamWrap').find('input').not(":checked").parents('label').hide(); | ||
350 | + }); | ||
361 | }, true); | 351 | }, true); |
362 | 352 | ||
353 | +// console.log(basicInfo); | ||
354 | + | ||
355 | +var ag3 = new common.grid({ | ||
356 | + el: "#goodsParamWrap2", | ||
357 | + hash: false, | ||
358 | + columns: common_columns.concat([{ | ||
359 | + display: "属性", | ||
360 | + render: function(item) { | ||
361 | + item.required = item.isMust == "Y" ? "required" : ""; | ||
362 | + item.id = item.parameterMakeId; | ||
363 | + var attrs = NETSALEDATA.specialAttrBo; | ||
364 | + if (attrs && attrs.materialList) { | ||
365 | + var _arr = []; | ||
366 | + for (var i in attrs.materialList) { | ||
367 | + _arr.push(attrs.materialList[i].id); | ||
368 | + } | ||
369 | + item.__val = _arr.join('|'); | ||
370 | + } | ||
371 | + | ||
372 | + item.__name = "goodsParamWrap2"; | ||
373 | + return common.util.__template2($("#template33").html(), item); | ||
374 | + } | ||
375 | + }]), | ||
376 | + complete: function() { | ||
377 | + ag3.__edit.init(); | ||
378 | + } | ||
379 | +}); | ||
380 | +ag3.__edit = new common.edit("#goodsParamWrap2"); | ||
381 | +common.util.__ajax({ | ||
382 | + url: '/base/goods/queryMaterialList', | ||
383 | + data: { | ||
384 | + categoryId: basicInfo.maxSortId | ||
385 | + } | ||
386 | +}, function(res) { | ||
387 | + console.log("接口queryMaterialList", res.data); | ||
388 | + ag3.init([res.data]); | ||
389 | +}, true); | ||
390 | + | ||
391 | + | ||
363 | $(document).on("change", "#goodsParamWrap .attr_input", function() { | 392 | $(document).on("change", "#goodsParamWrap .attr_input", function() { |
364 | var item = ag2.rows[$(this).data("index")]; | 393 | var item = ag2.rows[$(this).data("index")]; |
365 | item.val = $(this).val(); | 394 | item.val = $(this).val(); |
366 | }); | 395 | }); |
367 | -$(document).on("change", "#goodsParamWrap .attr_checkobx_class", function() { | ||
368 | - var item = ag2.rows[$(this).data("index")]; | ||
369 | - item.val = $("#attr_" + $(this).data("index")).val().replace(/\|/g, ','); | ||
370 | -}) | 396 | + |
371 | $(document).on("change", "#attributeTable .attr_input", function() { | 397 | $(document).on("change", "#attributeTable .attr_input", function() { |
372 | var item = ag.rows[$(this).data("index")]; | 398 | var item = ag.rows[$(this).data("index")]; |
373 | item.val = $(this).val(); | 399 | item.val = $(this).val(); |
374 | }); | 400 | }); |
375 | 401 | ||
402 | +$(document).on("change", "#goodsParamWrap .attr_checkobx_class", function() { | ||
403 | + var item = ag2.rows[$(this).data("index")]; | ||
404 | + item.val = $("#goodsParamWrap_attr_" + $(this).data("index")).val().replace(/\|/g, ','); | ||
405 | +}) | ||
406 | + | ||
407 | +$(document).on("change", "#goodsParamWrap2 .attr_checkobx_class", function() { | ||
408 | + var item = ag3.rows[$(this).data("index")]; | ||
409 | + item.val = $("#goodsParamWrap2_attr_" + $(this).data("index")).val().replace(/\|/g, ','); | ||
410 | +}) | ||
411 | + | ||
376 | 412 | ||
377 | /*保存*/ | 413 | /*保存*/ |
378 | GOLABDATA.on("TYgoodsParams", function() { | 414 | GOLABDATA.on("TYgoodsParams", function() { |
@@ -381,24 +417,24 @@ GOLABDATA.on("TYgoodsParams", function() { | @@ -381,24 +417,24 @@ GOLABDATA.on("TYgoodsParams", function() { | ||
381 | return ag.__edit.errMessage; | 417 | return ag.__edit.errMessage; |
382 | } | 418 | } |
383 | if (!ag2.__edit.validate(true)) { | 419 | if (!ag2.__edit.validate(true)) { |
384 | - return ag.__edit.errMessage; | 420 | + return ag2.__edit.errMessage; |
421 | + } | ||
422 | + if (!ag3.__edit.validate(true)) { | ||
423 | + return ag3.__edit.errMessage; | ||
385 | } | 424 | } |
386 | 425 | ||
387 | var productStandardRelationStr = []; | 426 | var productStandardRelationStr = []; |
388 | if (ag.rows.length > 0) { | 427 | if (ag.rows.length > 0) { |
389 | for (var i in ag.rows) { | 428 | for (var i in ag.rows) { |
390 | if (ag.rows[i].val) { | 429 | if (ag.rows[i].val) { |
391 | - var arr = ag.rows[i].val.split('|'); | ||
392 | var idNameList = ag.rows[i].idNameList; | 430 | var idNameList = ag.rows[i].idNameList; |
393 | for (var x in idNameList) { | 431 | for (var x in idNameList) { |
394 | - for (var y in arr) { | ||
395 | - if (arr[y] == idNameList[x].id) { | ||
396 | - productStandardRelationStr.push({ | ||
397 | - standardId: ag.rows[i].attributeId, | ||
398 | - standardVal: idNameList[x].text, | ||
399 | - parameterMakeId: idNameList[x].id | ||
400 | - }); | ||
401 | - } | 432 | + if (ag.rows[i].val == idNameList[x].id) { |
433 | + productStandardRelationStr.push({ | ||
434 | + standardId: ag.rows[i].attributeId, | ||
435 | + standardVal: idNameList[x].text, | ||
436 | + parameterMakeId: idNameList[x].id | ||
437 | + }); | ||
402 | } | 438 | } |
403 | } | 439 | } |
404 | } | 440 | } |
@@ -421,8 +457,14 @@ GOLABDATA.on("TYgoodsParams", function() { | @@ -421,8 +457,14 @@ GOLABDATA.on("TYgoodsParams", function() { | ||
421 | } | 457 | } |
422 | } | 458 | } |
423 | data.attributeProValuesOne = JSON.stringify(goodsParamArr); | 459 | data.attributeProValuesOne = JSON.stringify(goodsParamArr); |
460 | + | ||
461 | + data.productMaterial = ""; | ||
462 | + if (ag3.rows.length > 0) { | ||
463 | + data.productMaterial = ag3.rows[0].val; | ||
464 | + } | ||
465 | + | ||
424 | data.productSkn = $('#productSkn').val(); | 466 | data.productSkn = $('#productSkn').val(); |
425 | - console.log(data); | 467 | + console.log("data", data); |
426 | return data; | 468 | return data; |
427 | 469 | ||
428 | }); | 470 | }); |
1 | exports.domain = require('../config/common.js').domain; | 1 | exports.domain = require('../config/common.js').domain; |
2 | -//exports.domain = "http://172.16.6.240:8088/platform"; | 2 | +// exports.domain="http://172.16.6.240:8088/platform"; |
3 | // exports.domain = "http://172.16.6.227:8088/platform"; | 3 | // exports.domain = "http://172.16.6.227:8088/platform"; |
4 | exports.res = [{ //基础商品列表 | 4 | exports.res = [{ //基础商品列表 |
5 | route: '/product/base/index', | 5 | route: '/product/base/index', |
@@ -166,7 +166,8 @@ exports.res = [{ //基础商品列表 | @@ -166,7 +166,8 @@ exports.res = [{ //基础商品列表 | ||
166 | url: '/productColor/queryProductColors', | 166 | url: '/productColor/queryProductColors', |
167 | data: { | 167 | data: { |
168 | pageTitle: "创建基础商品", | 168 | pageTitle: "创建基础商品", |
169 | - action: "/base/goods/ajax/add" | 169 | + action: "/base/goods/ajax/add", |
170 | + btnText: "提交审核" | ||
170 | }, | 171 | }, |
171 | src: '/basegoods/edit' | 172 | src: '/basegoods/edit' |
172 | }, { //添加接口 | 173 | }, { //添加接口 |
@@ -265,7 +266,8 @@ exports.res = [{ //基础商品列表 | @@ -265,7 +266,8 @@ exports.res = [{ //基础商品列表 | ||
265 | src: '/basegoods/edit', | 266 | src: '/basegoods/edit', |
266 | data: { | 267 | data: { |
267 | pageTitle: "修改基础商品", | 268 | pageTitle: "修改基础商品", |
268 | - action: "/base/goods/ajax/update" | 269 | + action: "/base/goods/ajax/update", |
270 | + btnText: "保存" | ||
269 | } | 271 | } |
270 | }, { //删除 | 272 | }, { //删除 |
271 | route: '/base/goods/ajax/delete', | 273 | route: '/base/goods/ajax/delete', |
@@ -443,9 +445,7 @@ exports.res = [{ //基础商品列表 | @@ -443,9 +445,7 @@ exports.res = [{ //基础商品列表 | ||
443 | method: 'GET', | 445 | method: 'GET', |
444 | view: 'pages/basegoods/info', | 446 | view: 'pages/basegoods/info', |
445 | src: '/basegoods/goodsInfo' | 447 | src: '/basegoods/goodsInfo' |
446 | - }, | ||
447 | - | ||
448 | - { | 448 | + }, { |
449 | // 获取商品详情数据 | 449 | // 获取商品详情数据 |
450 | route: '/base/goods/getData', | 450 | route: '/base/goods/getData', |
451 | method: 'POST', | 451 | method: 'POST', |
@@ -482,9 +482,9 @@ exports.res = [{ //基础商品列表 | @@ -482,9 +482,9 @@ exports.res = [{ //基础商品列表 | ||
482 | }, { | 482 | }, { |
483 | route: '/base/goods/queryAllProductAttr', | 483 | route: '/base/goods/queryAllProductAttr', |
484 | method: 'POST', | 484 | method: 'POST', |
485 | - url: '/product/queryAllProductAttr', | 485 | + url: '/standard/queryAllBySortId4Html', |
486 | params: [{ | 486 | params: [{ |
487 | - name: 'categoryId', | 487 | + name: 'param', |
488 | type: 'Number' | 488 | type: 'Number' |
489 | }, | 489 | }, |
490 | // 1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数 | 490 | // 1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数 |
@@ -494,6 +494,14 @@ exports.res = [{ //基础商品列表 | @@ -494,6 +494,14 @@ exports.res = [{ //基础商品列表 | ||
494 | } | 494 | } |
495 | ] | 495 | ] |
496 | }, { | 496 | }, { |
497 | + route: '/base/goods/queryMaterialList', | ||
498 | + method: 'POST', | ||
499 | + url: '/product/queryMaterialList', | ||
500 | + params: [{ | ||
501 | + name: 'categoryId', | ||
502 | + type: 'Number' | ||
503 | + }] | ||
504 | + }, { | ||
497 | route: '/goods/query/querySortBySmallSort', | 505 | route: '/goods/query/querySortBySmallSort', |
498 | method: 'POST', | 506 | method: 'POST', |
499 | url: '/product/querySortBySmallSort', | 507 | url: '/product/querySortBySmallSort', |
@@ -245,9 +245,8 @@ exports.res = [{ | @@ -245,9 +245,8 @@ exports.res = [{ | ||
245 | action: 'audit' | 245 | action: 'audit' |
246 | } | 246 | } |
247 | 247 | ||
248 | - }, | ||
249 | - | ||
250 | - { | 248 | + }, { |
249 | + //网销信息 -> 查询网销详情 | ||
251 | route: '/goods/netsale/getdata', | 250 | route: '/goods/netsale/getdata', |
252 | method: 'POST', | 251 | method: 'POST', |
253 | url: '/product/getNetSaleInfo', | 252 | url: '/product/getNetSaleInfo', |
@@ -332,6 +331,12 @@ exports.res = [{ | @@ -332,6 +331,12 @@ exports.res = [{ | ||
332 | }, { | 331 | }, { |
333 | name: 'goodsImagesReq', | 332 | name: 'goodsImagesReq', |
334 | type: 'string' | 333 | type: 'string' |
334 | + }, { | ||
335 | + name: 'productStandardRelationStr', | ||
336 | + type: 'string' | ||
337 | + }, { | ||
338 | + name: 'productMaterial', | ||
339 | + type: 'string' | ||
335 | }] | 340 | }] |
336 | }, { | 341 | }, { |
337 | //网销信息 -> 保存基本信息接口 | 342 | //网销信息 -> 保存基本信息接口 |
@@ -426,6 +431,24 @@ exports.res = [{ | @@ -426,6 +431,24 @@ exports.res = [{ | ||
426 | type: 'number' | 431 | type: 'number' |
427 | }] | 432 | }] |
428 | }, { | 433 | }, { |
434 | + //网销信息 -> 查询品牌款型系列列表 | ||
435 | + route: '/goods/brandSeries/queryAll4Select', | ||
436 | + method: 'POST', | ||
437 | + url: '/brandSeries/queryAll4Select', | ||
438 | + params: [{ | ||
439 | + name: 'type', | ||
440 | + type: 'number' | ||
441 | + }, { | ||
442 | + name: 'status', | ||
443 | + type: 'number' | ||
444 | + }, { | ||
445 | + name: 'shopsId', | ||
446 | + type: 'number' | ||
447 | + }, { | ||
448 | + name: 'brandId', | ||
449 | + type: 'number' | ||
450 | + }] | ||
451 | + }, { | ||
429 | //网销信息 -> 品牌关联 | 452 | //网销信息 -> 品牌关联 |
430 | route: '/goods/product/saveBrandRelation', | 453 | route: '/goods/product/saveBrandRelation', |
431 | method: 'POST', | 454 | method: 'POST', |
@@ -500,5 +523,193 @@ exports.res = [{ | @@ -500,5 +523,193 @@ exports.res = [{ | ||
500 | name: 'endTime', | 523 | name: 'endTime', |
501 | type: 'number' | 524 | type: 'number' |
502 | }] | 525 | }] |
526 | + }, | ||
527 | + //***********************************陶雨******************************* | ||
528 | + { | ||
529 | + //保存搜索顺序 | ||
530 | + route: '/netSale/saveSearchSort', | ||
531 | + method: 'POST', | ||
532 | + url: '/product/saveSearchSort', | ||
533 | + params: [{ | ||
534 | + name: 'searchSortList', | ||
535 | + type: 'string' | ||
536 | + }] | ||
537 | + }, { | ||
538 | + //查找热搜词 | ||
539 | + route: '/netSale/queryHotSearchTerms', | ||
540 | + method: 'POST', | ||
541 | + url: '/searchWords/queryHotSearchTerms', | ||
542 | + params: [{ | ||
543 | + name: 'page', | ||
544 | + type: 'number' | ||
545 | + }, { | ||
546 | + name: 'size', | ||
547 | + type: 'number', | ||
548 | + def: 10 | ||
549 | + }] | ||
550 | + }, { | ||
551 | + //查找洗涤提示 | ||
552 | + route: '/netSale/getAll4Select', | ||
553 | + method: 'POST', | ||
554 | + url: '/washTips/getAll4Select/', | ||
555 | + params: [] | ||
556 | + }, { | ||
557 | + //查找材质参数 | ||
558 | + route: '/netSale/queryAllBySortId4Select', | ||
559 | + method: 'POST', | ||
560 | + url: '/productMaterial/queryAllBySortId4Select', | ||
561 | + params: [{ | ||
562 | + name: 'param', | ||
563 | + type: 'number' | ||
564 | + }] | ||
565 | + }, { | ||
566 | + //查找所有商品参数信息 //暂时没用 | ||
567 | + route: '/netSale/queryAllGoodsParams', | ||
568 | + method: 'POST', | ||
569 | + apis: { | ||
570 | + washTipsList: { | ||
571 | + url: '/washTips/getAll4Select/' | ||
572 | + }, | ||
573 | + materialList: { | ||
574 | + url: 'productMaterial/queryAllBySortId4Select', | ||
575 | + params: [{ | ||
576 | + name: 'param', | ||
577 | + type: 'number' | ||
578 | + }], | ||
579 | + isJsonRaw: true | ||
580 | + } | ||
581 | + } | ||
582 | + }, { | ||
583 | + //保存搜索关键词 | ||
584 | + route: '/netSale/saveNetSaleSearchKeys', | ||
585 | + method: 'POST', | ||
586 | + url: '/product/saveNetSaleSearchKeys', | ||
587 | + params: [{ | ||
588 | + name: 'productSkn', | ||
589 | + type: 'number' | ||
590 | + }, { | ||
591 | + name: 'searchKeys', | ||
592 | + type: 'string' | ||
593 | + }] | ||
594 | + }, { | ||
595 | + //保存商品参数 | ||
596 | + route: '/netSale/saveProductParam', | ||
597 | + method: 'POST', | ||
598 | + url: '/product/saveProductParam', | ||
599 | + params: [{ | ||
600 | + name: 'productSkn', | ||
601 | + type: 'number' | ||
602 | + }, { | ||
603 | + name: 'attributeProValuesOne', | ||
604 | + type: 'string' | ||
605 | + }, { | ||
606 | + name: 'productStandardRelationStr', | ||
607 | + type: 'string' | ||
608 | + }, { | ||
609 | + name: 'productMaterial', | ||
610 | + type: 'string' | ||
611 | + }] | ||
612 | + }, | ||
613 | + //************************************weiqingting********************** | ||
614 | + //商品描述 | ||
615 | + { | ||
616 | + route: '/netSale/saveProductDesc', | ||
617 | + method: 'POST', | ||
618 | + url: '/product/saveProductDesc', | ||
619 | + params: [{ | ||
620 | + name: 'productSkn', | ||
621 | + type: 'Number' | ||
622 | + }, { | ||
623 | + name: 'productDesc', | ||
624 | + type: 'String' | ||
625 | + }] | ||
626 | + }, | ||
627 | + //小编推荐 | ||
628 | + { | ||
629 | + route: '/netSale/saveNetSaleRecommend', | ||
630 | + method: 'POST', | ||
631 | + url: '/product/saveNetSaleRecommend', | ||
632 | + params: [{ | ||
633 | + name: 'productSkn', | ||
634 | + type: 'Number' | ||
635 | + }, { | ||
636 | + name: 'recommend', | ||
637 | + type: 'String' | ||
638 | + }] | ||
639 | + }, | ||
640 | + | ||
641 | + { //查询搭配列表 | ||
642 | + route: "/netSale/selectCollocationListBySkn", | ||
643 | + method: 'POST', | ||
644 | + url: '/collocation/selectCollocationListBySkn', | ||
645 | + params: [{ | ||
646 | + name: 'productSkn', | ||
647 | + type: 'Number' | ||
648 | + }, { | ||
649 | + name: 'page', | ||
650 | + type: 'Number' | ||
651 | + }, { | ||
652 | + name: 'size', | ||
653 | + type: 'Number' | ||
654 | + }] | ||
655 | + }, { //获取单个商品搭配信息 | ||
656 | + route: '/netSale/selectCollocationById', | ||
657 | + method: 'POST', | ||
658 | + url: '/collocation/selectCollocationById', | ||
659 | + params: [{ | ||
660 | + name: 'param', | ||
661 | + type: 'Number' | ||
662 | + }] | ||
663 | + }, { //添加单个搭配 | ||
664 | + route: '/netSale/insertCollocation', | ||
665 | + method: 'POST', | ||
666 | + url: '/collocation/insertCollocation', | ||
667 | + params: [{ | ||
668 | + name: 'productSkn', | ||
669 | + type: 'Number' | ||
670 | + }, { | ||
671 | + name: 'imageUrl', | ||
672 | + type: 'String' | ||
673 | + }, { | ||
674 | + name: 'content', | ||
675 | + type: 'String' | ||
676 | + }, { | ||
677 | + name: 'infoStr', | ||
678 | + type: 'String' | ||
679 | + }] | ||
680 | + }, { //更新单个搭配 | ||
681 | + route: '/netSale/updateCollocation', | ||
682 | + method: 'POST', | ||
683 | + url: '/collocation/updateCollocation', | ||
684 | + params: [{ | ||
685 | + name: 'id', | ||
686 | + type: 'Number' | ||
687 | + }, { | ||
688 | + name: 'imageUrl', | ||
689 | + type: 'String' | ||
690 | + }, { | ||
691 | + name: 'content', | ||
692 | + type: 'String' | ||
693 | + }, { | ||
694 | + name: 'infoStr', | ||
695 | + type: 'String' | ||
696 | + }] | ||
697 | + }, { //删除单个搭配 | ||
698 | + route: '/netSale/delCollocationById', | ||
699 | + method: 'POST', | ||
700 | + url: '/collocation/delCollocationById', | ||
701 | + params: [{ | ||
702 | + name: 'param', | ||
703 | + type: 'Number' | ||
704 | + }] | ||
705 | + }, { //单独维护封面信息 | ||
706 | + //http://172.16.6.227:8083/yohobuy-platform-web/product/manageProductImg | ||
707 | + route: '/netSale/manageProductImg', | ||
708 | + method: 'POST', | ||
709 | + url: '/product/manageProductImg', | ||
710 | + params: [{ | ||
711 | + name: 'goodsImagesReq', | ||
712 | + type: 'string' | ||
713 | + }] | ||
503 | } | 714 | } |
504 | -] | ||
715 | +]; |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | </div> | 20 | </div> |
21 | </div> | 21 | </div> |
22 | <div class="panel-footer"> | 22 | <div class="panel-footer"> |
23 | - <button class="btn btn-primary" id="btn-recommand">保存</button> | 23 | + <a href="javascript:;" class="btn btn-primary" id="btn-recommand">保存</a> |
24 | </div> | 24 | </div> |
25 | </div> | 25 | </div> |
26 | 26 |
@@ -6,8 +6,15 @@ | @@ -6,8 +6,15 @@ | ||
6 | </div> | 6 | </div> |
7 | <h2 class="panel-title">商品参数</h2> | 7 | <h2 class="panel-title">商品参数</h2> |
8 | </div> | 8 | </div> |
9 | - <div id="goodsParamWrap" class="panel-body nopadding"> | 9 | + <div class="panel-body"> |
10 | + <div id="attributeTable" class="panel-body nopadding"> | ||
11 | + </div> | ||
12 | + <div id="goodsParamWrap" class="panel-body nopadding"> | ||
13 | + </div> | ||
14 | + <div id="goodsParamWrap2" class="panel-body nopadding"> | ||
15 | + </div> | ||
10 | </div> | 16 | </div> |
17 | + | ||
11 | <div class="panel-footer" id="goodsParams-footer"> | 18 | <div class="panel-footer" id="goodsParams-footer"> |
12 | <a href="javascript:;" class="btn btn-primary" id="propertySave">保存</a> | 19 | <a href="javascript:;" class="btn btn-primary" id="propertySave">保存</a> |
13 | </div> | 20 | </div> |
@@ -34,7 +41,7 @@ | @@ -34,7 +41,7 @@ | ||
34 | <input type="hidden" id="washTips" value="{washTips}" for="checkbox"> | 41 | <input type="hidden" id="washTips" value="{washTips}" for="checkbox"> |
35 | </script> --> | 42 | </script> --> |
36 | 43 | ||
37 | -<script type="text/template" id="goodsParamTemp"> | 44 | +<!-- <script type="text/template" id="goodsParamTemp"> |
38 | [[each data as b index]] | 45 | [[each data as b index]] |
39 | [[if b.idNameList && b.idNameList.length>0]] | 46 | [[if b.idNameList && b.idNameList.length>0]] |
40 | <div class="goods-param-group form-group"> | 47 | <div class="goods-param-group form-group"> |
@@ -53,9 +60,45 @@ | @@ -53,9 +60,45 @@ | ||
53 | <label style="cursor: pointer;"><input name="[[b.attributeId]]" type="[[b.inputType]]" value="[[c.id]]">[[c.text]]</label> | 60 | <label style="cursor: pointer;"><input name="[[b.attributeId]]" type="[[b.inputType]]" value="[[c.id]]">[[c.text]]</label> |
54 | [[/each]] | 61 | [[/each]] |
55 | </span> | 62 | </span> |
56 | - <input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues||'']]"> | 63 | + <input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues||'']]" placeholder="[[b.attributeName]]" required> |
57 | [[/if]] | 64 | [[/if]] |
58 | </div> | 65 | </div> |
59 | [[/if]] | 66 | [[/if]] |
60 | [[/each]] | 67 | [[/each]] |
68 | +</script> --> | ||
69 | + | ||
70 | +<script type="text/template" id="template33"> | ||
71 | +<div class="form-group"> | ||
72 | +[[if inputType=='checkbox']] | ||
73 | + [[each idNameList as item index ]] | ||
74 | +<label class="radio-inline"> | ||
75 | + <input type="checkbox" name="[[__name]]_attr_[[__index]]" data-index=[[__index]] class="attr_checkobx_class" value="[[item.id]]">[[item.text]]</label> | ||
76 | + [[/each]] | ||
77 | + <input type="hidden" id="[[__name]]_attr_[[__index]]" value="[[__val||'']]" [[required]] for="checkbox" placeholder="[[attributeName]]"/> | ||
78 | +[[/if]] | ||
79 | + | ||
80 | +[[if inputType=='radio']] | ||
81 | +[[each idNameList as item index ]] | ||
82 | +<label class="radio-inline"> | ||
83 | + <input type="radio" name="[[__name]]_attr_[[__index]]" data-index=[[__index]] class="attr_input" value="[[item.id]]">[[item.text]]</label> | ||
84 | +[[/each]] | ||
85 | +<input type="hidden" id="[[__name]]_attr_[[__index]]" data-index='[[__index]]' value="[[__val||'']]" [[required]] for="radio" placeholder="[[attributeName]]" /> | ||
86 | +[[/if]] | ||
87 | + | ||
88 | +[[if inputType=='select']] | ||
89 | +<select class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[__val||'']]" [[required]]> | ||
90 | + <option value="">请选择[[attributeName]]</option> | ||
91 | +[[each idNameList as item index ]] | ||
92 | + <option value="[[item.id]]">[[item.text]]</option> | ||
93 | +[[/each]] | ||
94 | +</select> | ||
95 | +[[/if]] | ||
96 | + | ||
97 | +[[if inputType=='text']] | ||
98 | +<input type="text" class="form-control attr_input" style="width: 280px" data-index='[[__index]]' value="[[val||'']]" [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]"/> | ||
99 | +[[/if]] | ||
100 | +[[if inputType=='textarea']] | ||
101 | +<textarea class="form-control attr_input" data-index='[[__index]]' [[required]] maxlength='[[maxValueLen]]' placeholder="[[attributeName]]">[[val||'']]</textarea> | ||
102 | +[[/if]] | ||
103 | +</div> | ||
61 | </script> | 104 | </script> |
@@ -10,32 +10,30 @@ | @@ -10,32 +10,30 @@ | ||
10 | 10 | ||
11 | </div> | 11 | </div> |
12 | </div> | 12 | </div> |
13 | -<script type="text/template" id="sizeifo-template"> | ||
14 | -<table style="table-layout:fixed " class="table table-striped table-bordered responsive dataTable no-footer"> | ||
15 | - <thead> | ||
16 | - <tr> | ||
17 | - <td>参考尺码</td> | ||
18 | - [[each sizeAttributeBos as item index]] | ||
19 | - <td>[[item.attributeName]]</td> | ||
20 | - [[/each]] | ||
21 | - </tr> | ||
22 | - </thead> | 13 | +<script type="text/template" id="sizeinfo-template"> |
14 | + [[if sizeRelationsList && sizeRelationsList.length > 0]] | ||
15 | + <table class="table table-striped table-hover table-bordered responsive dataTable no-footer"> | ||
16 | + <thead> | ||
17 | + <tr> | ||
18 | + <td>尺码</td> | ||
19 | + <td>参考尺码([[genderName]])</td> | ||
20 | + [[each sizeRelationsList[0].prdSizeAttributeBoList as item index]] | ||
21 | + <td>[[item.sizeAttributeName]]</td> | ||
22 | + [[/each]] | ||
23 | + </tr> | ||
24 | + </thead> | ||
23 | 25 | ||
24 | - <tbody> | 26 | + <tbody> |
27 | + [[each sizeRelationsList as item index]] | ||
25 | <tr> | 28 | <tr> |
26 | - <td> | ||
27 | - [[each sizeBoList as item index]] | ||
28 | - <def>[[item.sizeName]]</def> | ||
29 | - [[each item.sortAttributes as item1 index1]] | ||
30 | - <def>[[item1.sizeValue]]</def>/ | ||
31 | - [[/each]] | ||
32 | - <br> | ||
33 | - [[/each]] | ||
34 | - </td> | ||
35 | - [[each sizeAttributeBos as item index]] | ||
36 | - <td>[[item.id]]</td> | 29 | + <td>[[item.sizeName]]</td> |
30 | + <td>[[item.referenceName?item.referenceName:""]]</td> | ||
31 | + [[each item.prdSizeAttributeBoList as item1 index1]] | ||
32 | + <td>[[item1.sizeValue]]</td> | ||
37 | [[/each]] | 33 | [[/each]] |
38 | </tr> | 34 | </tr> |
39 | - </tbody> | ||
40 | -</table> | 35 | + [[/each]] |
36 | + </tbody> | ||
37 | + </table> | ||
38 | + [[/if]] | ||
41 | </script> | 39 | </script> |
-
Please register or login to post a comment