Authored by 陶雨

网销商品参数改回、修复网销部分提交的bug

... ... @@ -19,19 +19,12 @@ if (window.NETSALEDATA) {
//材质初始化
common.util.__ajax({
url: '/netSale/queryMaterialList',
url: '/netSale/queryAllBySortId4Select',
data: {
categoryId: baseProduct.maxSortId,
saleType: 2,
displayPosition: 3
param: baseProduct.maxSortId
}
}, function(res) {
var attrs = [];
if(res.data) {
attrs = res.data.attributeValues.split(",");
}
var obj = {"attrs":attrs};
$("#material-group").html(common.util.__template2($("#material-params").html(), obj || {}));
$("#material-group").html(common.util.__template2($("#material-params").html(), res || {}));
var materials = [];
for (var i = 0; i < materialList.length; i++) {
materials[i] = materialList[i].id;
... ... @@ -42,19 +35,10 @@ if (window.NETSALEDATA) {
//洗涤提示初始化
common.util.__ajax({
url: '/netSale/queryWashTipsList',
data: {
categoryId: baseProduct.maxSortId,
saleType: 2,
displayPosition: 3
}
url: '/netSale/getAll4Select',
data: {}
}, function(res) {
var attrs = [];
if(res.data) {
attrs = res.data.attributeValues.split(",");
}
var obj = {"attrs":attrs};
$("#washTip-group").html(common.util.__template2($("#washTip-params").html(), obj || {}));
$("#washTip-group").html(common.util.__template2($("#washTip-params").html(), res || {}));
var washTips = [];
for (var i = 0; i < washTipsList.length; i++) {
washTips[i] = washTipsList[i].sortId;
... ... @@ -94,9 +78,8 @@ if (window.NETSALEDATA) {
washTips: washTips.replace(/\|/g, ","),
productMaterial: productMaterial.replace(/\|/g, ",")
}
}, function() {
// body...
});
return false;
});
window.GOLABDATA.on('TYcaizhi', function() {
... ... @@ -156,9 +139,8 @@ if (window.NETSALEDATA) {
productSkn: window.NETSALEDATA.baseProductInfo.baseProduct.productSkn,
searchKeys: searchKeys
}
}, function(res) {
});
return false;
});
window.GOLABDATA.on('TYsearchKey', function() {
... ... @@ -222,9 +204,8 @@ if (window.NETSALEDATA) {
data: {
searchSortList: JSON.stringify(searchSortList)
}
}, function() {
});
return false;
});
$("#sort0").on('change', function() {
... ...
exports.domain = require('../config/common.js').domain;
//exports.domain = "http://172.16.6.227:8088/platform/";
exports.res = [
{
... ... @@ -21,6 +22,22 @@ exports.res = [
]
},
{
//查找洗涤提示
route:'/netSale/getAll4Select',
method:'POST',
url: '/washTips/getAll4Select/',
params: []
},
{
//查找材质参数
route:'/netSale/queryAllBySortId4Select',
method:'POST',
url: '/productMaterial/queryAllBySortId4Select',
params: [
{name: 'param', type: 'number'}
]
},
{
//查找所有商品参数信息 //暂时没用
route:'/netSale/queryAllGoodsParams',
method:'POST',
... ...
/**
* Created by ty on 2016/3/17.
*/
//exports.domain = require('../config/common.js').domain;
exports.domain = 'http://172.16.6.252:9080';
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.252:9080';
exports.res = [
{
... ...
... ... @@ -22,8 +22,8 @@
<script type="text/template" id="material-params">
<label class="col-sm-2 control-label">材质</label>
<div class="col-sm-8 height40">
[[each attrs as item index]]
<label style="cursor: pointer;"><input type="checkbox" name="material" class="material" value=[[item]]>[[item]]</label>
[[each data as item index]]
<label style="cursor: pointer;"><input type="checkbox" name="material" class="material" value=[[item.id]]>[[item.text]]</label>
[[/each]]
</div>
<input type="hidden" id="material" value="{material}" for="checkbox">
... ... @@ -33,8 +33,8 @@
<script type="text/template" id="washTip-params">
<label class="col-sm-2 control-label">洗涤提示</label>
<div class="col-sm-8 height40">
[[each attrs as item index]]
<label style="cursor: pointer;"><input type="checkbox" name="washTips" class="washTips" value=[[item]]>[[item]]</label>
[[each data as item index]]
<label style="cursor: pointer;"><input type="checkbox" name="washTips" class="washTips" value=[[item.id]]>[[item.text]]</label>
[[/each]]
</div>
<input type="hidden" id="washTips" value="{washTips}" for="checkbox">
... ...
<div class="panel panel-default">
<form action="" class="form-horizontal form-bordered">
<a class="netsale-position" href="javascript:;" name="position7"></a>
<div class="panel-heading">
<div class="panel-btns" style="display: none;">
... ... @@ -27,5 +26,4 @@
<div class="panel-footer">
<button class="btn btn-primary" id="sort-save">保存</button>
</div>
</form>
</div>
\ No newline at end of file
... ...
<div class="panel panel-default">
<form action="" class="form-horizontal form-bordered">
<div class="panel-heading">
<a class="netsale-position" href="javascript:;" name="position5"></a>
<div class="panel-btns" style="display: none;">
<a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>
</div>
<h2 class="panel-title">尺码信息</h2>
<div class="panel-heading">
<a class="netsale-position" href="javascript:;" name="position5"></a>
<div class="panel-btns" style="display: none;">
<a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>
</div>
<div class="panel-body nopadding" id="body">
</div>
</form>
<h2 class="panel-title">尺码信息</h2>
</div>
<div class="panel-body nopadding" id="body">
</div>
</div>
<script type="text/template" id="sizeifo-template">
<table style="table-layout:fixed " class="table table-striped table-bordered responsive dataTable no-footer">
... ...