Authored by 王钱钧

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop

... ... @@ -23,6 +23,12 @@ var ENUM={
*/
goodsSizeList:{"sizeId":"","salePrice":"","barCode":"","isSuppled":""}
}
/*下拉选择*/
// new common.dropDown({el:"#shopId",ajax:"queryShop"});
// new common.dropDown({el:"#brandId",ajax:"queryBrand"});
// new common.dropDown({el:"#founder",ajax:"querySupplier"});
//baseTable
var g=new common.grid({
el:"#basicTable",
... ...
... ... @@ -37,6 +37,22 @@ var ENUM = {
}
};
var tabTree = new common.tabTree("#sortTree");
tabTree.init();
new common.dropDown({
el: '#shopId',
ajax: 'shopsRest'
});
new common.dropDown({
el: '#brandId',
ajax: 'brand'
});
var t = new common.tab({
el: "#basicTab",
click: function() {
... ... @@ -103,9 +119,9 @@ var g = new common.grid({
isScreen: common.util.__input("isScreen"),
isMeasure: common.util.__input("isMeasure"),
gender: common.util.__input("gender"),
maxSortId: common.util.__input("maxSortId"),
middleSortId: common.util.__input("middleSortId"),
smallSortId: common.util.__input("smallSortId"),
maxSortId: tabTree.selected[0] ? tabTree.selected[0].id : "",
middleSortId: tabTree.selected[1] ? tabTree.selected[1].id : "",
smallSortId: tabTree.selected[2] ? tabTree.selected[2].id : "",
isOutLets: common.util.__input("isOutLets"),
productStatus: common.util.__input("productStatus"),
size: common.util.__input("size"),
... ... @@ -136,7 +152,7 @@ var g = new common.grid({
render: function(item) {
return '<p><strong>吊牌价:</strong>' + item.retailPrice + '</p>' +
'<p><strong>销售价:</strong>' + item.salesPrice + '</p>' +
'<p><strong>是否VIP:</strong></p>' +
'<p><strong>是否VIP:</strong></p>' + item.isVIP + '</p>' +
'<p style="color: #ccc;"><strong>yoho币:</strong>' + item.returnCoin + '</p>';
}
}, {
... ... @@ -158,10 +174,10 @@ var g = new common.grid({
display: '搜索/标签',
hidden: true,
render: function(item) {
return '关键词:' + '<br>' +
return '关键词:' + item.searchAndLabel + '<br>' +
'风格:' + item.style + '<br>' +
'纹理:' + item.style + '<br>' +
'工艺:' + item.style + '<br>';
'纹理:' + item.pattern + '<br>' +
'工艺:' + item.makeCrafts + '<br>';
}
}, {
display: '操作信息',
... ... @@ -174,6 +190,7 @@ var g = new common.grid({
if (item.editTime) {
html += '<p>' + item.editTime + '</p>';
}
return html;
}
}, {
... ... @@ -185,6 +202,9 @@ var g = new common.grid({
if (item.shelveTime) {
html += '<br>上架时间:' + item.shelveTime;
}
if (item.status == 3) {
html += '<p style="color:red;">(' + item.rejectReason + ')</p>'
}
return html;
}
}, {
... ... @@ -214,6 +234,7 @@ g.init($("#gridurl").val());
//筛选
$("#filter-btn").click(function() {
loadtab();
g.reload(1);
});
... ...
... ... @@ -41,7 +41,9 @@ var basicInfohtml = '',
1: '普通',
2: '赠品'
}
};
},
basicInfo = NETSALEDATA.baseProductInfo.baseProduct || '',
productExtBo = NETSALEDATA.productExtBo || '';
/*
* 基本信息value值转换
... ... @@ -56,7 +58,7 @@ function convert(basicInfo, obj) {
return basicInfo;
}
var basicInfoData = convert(NETSALEDATA.baseProductInfo.baseProduct, convertObj);
var basicInfoData = convert(basicInfo, convertObj);
//基本信息
basicInfoData.renderType = $('.contentpanel').data('type');
... ... @@ -69,9 +71,10 @@ $('#goods-table').html(common.util.__template2($('#goodsList').html(), {
}));
//上架必填
NETSALEDATA.productExtBo.renderType = $('.contentpanel').data('type');
NETSALEDATA.productExtBo.sellChannels = NETSALEDATA.productExtBo.sellChannels.replace(/,/g, "|");
$('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), NETSALEDATA.productExtBo));
productExtBo.renderType = $('.contentpanel').data('type');
productExtBo.sellChannels = productExtBo.sellChannels ? productExtBo.sellChannels.replace(/,/g, "|") : '';
$('#product-ext').html(common.util.__template2($('#productExtBoTemp').html(), productExtBo));
if ($('.contentpanel').data('type') == 'info') {
... ...
... ... @@ -30,12 +30,16 @@ common.util.__ajax({
}));
if (NETSALEDATA.brandRelationList) {
$('#brandWrap').html(common.util.__template2($('#brandWrap').html(), {
$('.selected-brand').html(common.util.__template2($('#brandShowTemp').html(), {
brandRelationList: NETSALEDATA.brandRelationList,
brandRelation: brandSelectArr.join('|')
}));
};
e.init();
if ($('.contentpanel').data('type') == 'info') {
$('.brand-list').find('input').attr('disabled', true);
}
}, true);
$.each(NETSALEDATA.brandRelationList, function(index, value) {
... ...
//exports.domain = require('../config/common.js').domain;
exports.domain = 'http://172.16.6.227:8083/yohobuy-platform-web'; //马力
exports.domain = require('../config/common.js').domain;
// exports.domain = 'http://172.16.6.227:8083/yohobuy-platform-web'; //马力
//exports.domain = 'http://172.16.6.236:8080/platform'; //钱军
//exports.domain = 'http://172.16.6.162:8088/platform'; //李建
... ...
// exports.domain = require('../config/common.js').domain;
exports.domain = 'http://172.16.6.227:8084/yohobuy-platform-web';
exports.domain = require('../config/common.js').domain;
// exports.domain = 'http://172.16.6.227:8084/yohobuy-platform-web';
exports.res = [
//商品描述
{
... ...
... ... @@ -2,8 +2,8 @@ var request = require('request');
var _ = require('lodash');
var fs = require('fs');
var ipaddr = require('ipaddr.js');
//var domain = require('../../config/common.js').domain;
var domain = 'http://172.16.6.227:8083/yohobuy-platform-web';
var domain = require('../../config/common.js').domain;
// var domain = 'http://172.16.6.227:8083/yohobuy-platform-web';
exports.downFile = function(req, res) {
var options = {
... ...
... ... @@ -57,16 +57,16 @@
</div>
<div class="panel-col">
<select name="isScreen" id="isScreen" tabindex="-1" title="" class="form-control height40">
<option value="-1">拍摄状态</option>
<option value="1">已拍摄</option>
<option value="0">未拍摄</option>
<option value="">拍摄状态</option>
<option value="Y">已拍摄</option>
<option value="N">未拍摄</option>
</select>
</div>
<div class="panel-col">
<select name="isMeasure" id="isMeasure" tabindex="-1" title="" class="form-control height40">
<option value="-1">测量状态</option>
<option value="1">已测量</option>
<option value="0">未测量</option>
<option value="">测量状态</option>
<option value="Y">已测量</option>
<option value="N">未测量</option>
</select>
</div>
<div class="panel-col">
... ... @@ -77,7 +77,7 @@
<option value="3">通用</option>
</select>
</div>
<div class="panel-col">
<!-- <div class="panel-col">
<select name="maxSortId" id="maxSortId" tabindex="-1" title="" class="form-control height40">
<option value="-1">请选择一级类目</option>
</select>
... ... @@ -91,13 +91,11 @@
<select name="smallSortId" id="smallSortId" tabindex="-1" title="" class="form-control height40">
<option value="-1">请选择三级类目</option>
</select>
</div>
<!-- <div class="panel-col">
<select name="cate4" id="cate4" tabindex="-1" title="" class="form-control height40">
<option value="-1">请选择四级类目</option>
</select>
</div> -->
<div class="panel-col">
<div id="sortTree"></div>
</div>
<div class="panel-col">
<select name="isOutLets" id="isOutLets" tabindex="-1" title="" class="form-control height40">
<option value="-1">是否奥莱</option>
<option value="Y">奥莱</option>
... ... @@ -106,16 +104,16 @@
</div>
<div class="panel-col">
<select name="productStatus" id="productStatus" tabindex="-1" title="" class="form-control height40">
<option value="-1">状态</option>
<option value="1">待上架</option>
<option value="0">待审核</option>
<option value="">状态</option>
<option value="-1">待上架</option>
<option value="2">待审核</option>
<option value="3">驳回</option>
<option value="0">通过</option>
<option value="4">通过</option>
<option value="1">再次上架待审核</option>
<option value="0">再次上架驳回</option>
<option value="1">再次上架通过</option>
<option value="0">已上架</option>
<option value="0">已下架</option>
<option value="5">再次上架通过</option>
<option value="6">已上架</option>
<option value="7">已下架</option>
</select>
</div>
... ...
... ... @@ -24,12 +24,19 @@
<div class="col-sm-3">店铺:[[shopName]]</div>
<div class="col-sm-3">品牌:[[brandName]]</div>
<div class="col-sm-3">供应商:[[supplierName]]</div>
[[if renderType=='edit']]
<div class="col-sm-3">厂家编号:[[factoryCode]]</div>
[[else]]
<div class="col-sm-3"><img src="[[productImageUrl]]" alt=""></div>
[[/if]]
</div>
<div class="form-group">
<div class="col-sm-3">品类:</div>
<div class="col-sm-3">货品年:[[goodsYears]]</div>
<div class="col-sm-3">货品季:[[goodsSeason]]</div>
[[if renderType=='info']]
<div class="col-sm-3">厂家编号:[[factoryCode]]</div>
[[/if]]
</div>
<div class="form-group">
<div class="col-sm-3">SKN[[productSkn]]</div>
... ...
... ... @@ -4,15 +4,12 @@
<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>
<h2 class="panel-title">(商品)品牌关联</h2>
</div>
<div id="brandWrap" class="panel-body">
<div class="form-group selected-brand" style="min-height: 60px;">
<input id="brandRelationList" type="hidden" value="[[brandRelation]]" for="checkbox">
[[each brandRelationList as a index]]
<div class="col-sm-2" data-id="[[a.brandId]]">[[a.brandName]]</div>
[[/each]]
</div>
<div class="form-group brand-list">
</div>
... ... @@ -36,4 +33,10 @@
</div>
</div>
[[/each]]
</script>
<script type="text/template" id="brandShowTemp">
<input id="brandRelationList" type="hidden" value="[[brandRelation]]" for="checkbox">
[[each brandRelationList as a index]]
<div class="col-sm-2" data-id="[[a.brandId]]">[[a.brandName]]</div>
[[/each]]
</script>
\ No newline at end of file
... ...