Authored by 姜敏

Merge branch 'release/qqtest' of http://git.dev.yoho.cn/platform/yohobuy-portal-…

…fe into release/qqtest
... ... @@ -239,12 +239,19 @@ var g = new common.grid({
{
display: "年龄层/性别",
render: function(item) {
var html = [];
var ageLevel = AgeLevelEnum.level[item.ageLevel];
var gender = GenderEnum.gender[item.gender];
html.push("<p>" + ageLevel + " / " + gender + "</p>");
var html = '';
if (AgeLevelEnum.level[item.ageLevel]) {
html += AgeLevelEnum.level[item.ageLevel];
if (item.gender) {
html += '/';
}
}
if (GenderEnum.gender[item.gender]) {
html += GenderEnum.gender[item.gender]
}
return html;
return html.join('');
}
},
... ...
... ... @@ -5,18 +5,24 @@ var editBean = require('./partials/limitcode-edit-bean');
var e = new common.edit2("#basicForm");
var type = $("#basicForm").attr("role"),
action = $("#basicForm").data("action");
var isFirst = true;
var Bll = {
__render:function() {
editBean.currTime = common.util.__dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss");
if(new Date(editBean.currTime).getTime() > new Date(editBean.limitDateFrom)) {
editBean.useCurrTime = true;
}
$("#basicForm").html(common.util.__template2($("#limitcodeEdit-template").html(), editBean));
e.init();
if(type == "edit") {
$('input[name="skn_sku"]').prop('disabled', true);
$(".noEdit").prop("disabled", true);
$('input[name="userTypeLimit"]').prop('disabled', true);
if(editBean.limitDateFrom <= new Date()) {
if((new Date(editBean.limitDateFrom).getTime() <= new Date().getTime()) && isFirst) {
$("#limitDateFrom").prop("disabled", true);
}
isFirst = false;
}
},
__checkSkn:function(callback) {
... ... @@ -89,6 +95,14 @@ $(document).on("change", ".observe", function () {
editBean = common.util.__buildobj(name, '.', editBean, function (obj, name) {
obj[name] = $this.val();
});
if($this.prop("id") == "limitDateFrom" && new Date($this.val()).getTime() ) {
if(new Date(editBean.currTime).getTime() > new Date(editBean.limitDateFrom)) {
editBean.useCurrTime = true;
} else {
editBean.useCurrTime = false;
}
Bll.__render();
}
//console.log(editBean);
});
... ...
... ... @@ -979,7 +979,7 @@ function editorTipInit(id){
tipHtml = "<span>提示:【品牌一览】由PC端【品牌集合】适配,修改请到PC端【品牌集合】修改。</span>";
break;
case "editor-recommend":
tipHtml = "<span>提示:请上传像素50*50的图片,图片和标题会适配到APP的【热门品类】中。</span>";
tipHtml = "<span>提示:请上传像素150*150的图片,图片和标题会适配到APP的【热门品类】中。</span>";
break;
case "editor-recommend-app":
tipHtml = "<span>提示:【热门品类】由PC端【经典推荐】适配,修改请到PC端【经典推荐】修改。</span>";
... ...
... ... @@ -137,7 +137,7 @@ pc端店铺模板css
display: block;
float: right;
height: 50px;
width: 40%;
width: 50px;
}
/*------------------------热销推荐--------------------------*/
... ...
... ... @@ -91,12 +91,16 @@
<input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-2">
<select class="form-control btn-sort-kebu" value="[[item.isSuppled||'Y']]" data-index=[[index]] data-eq=[[__index]]>
<select class="form-control btn-sort-kebu" value="[[item.isSuppled||'N']]" data-index=[[index]] data-eq=[[__index]]>
<option value="N">不可补货</option>
<option value="Y">可补货</option>
</select>
</div>
[[if ISXIANGO]]
<div class="col-sm-2">
<input type="text" class="form-control btn-sort-kucun" value="[[item.presaleStorageNum]]" placeholder="预售库存" data-index=[[index]] data-eq=[[__index]] required></input>
</div>
[[/if]]
<div class="col-sm-2">
[[if __index==goodsSizeList.length-1]]
<button type="button" class="btn btn-info btn-xs btn-sort-add" data-index=[[index]]>+</button>
... ... @@ -105,7 +109,7 @@
<button type="button" class="btn btn-info btn-xs btn-sort-remove" data-index=[[index]] data-eq=[[__index]]>-</button>
[[/if]]
</div>
</div>
[[/each]]
</script>
... ... @@ -128,8 +132,8 @@
</select>
</div>
<label class="col-sm-1 control-label">JIT供应商</label>
<div class="col-sm-2">
<select id="supplierId" class="form-control">
... ... @@ -137,14 +141,14 @@
</select>
<div class="col-sm-12 control-label red">JIT商品必须选择JIT供应商</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">分类<span class="red">*</span></label>
<div class="col-sm-5">
<div id="tree"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">商品名称<span class="red">*</span></label>
... ... @@ -192,7 +196,6 @@
</div>
</div>
<div class="form-group">
<!-- 【年龄层】默认 成人 ,成人和大童小童互斥,如果是童装,年龄层必填,并且大童小童可以复选。 -->
<label class="col-sm-2 control-label">年龄层<span class="red">*</span></label>
<div class="col-sm-2">
<label class="radio-inline">
... ... @@ -223,7 +226,6 @@
<input type="radio" name="grade" value="0"></label>
</div>
<input type="hidden" id="grade" value="[[grade||'0']]" for="radio" required/>
<label class="col-sm-1 control-label">适销季<span class="red">*</span></label>
<div class="col-sm-2">
<label class="radio-inline">
... ... @@ -234,8 +236,7 @@
<input type="checkbox" name="seasons" value="seasons">四季</label>
<input type="hidden" id="seasons" name="seasons" value="[[seasons||'seasons']]" for="checkbox" placeholder="年龄层" />
</div>
</div>
<div class="form-group">
... ... @@ -289,8 +290,8 @@
<input type="radio" name="isOutLets" value="N"></label>
<input type="hidden" id="isOutLets" value="[[isOutLets||'B']]" for="radio" />
</div>
</div>
[[/if]]
... ... @@ -306,6 +307,11 @@
<input type="radio" name="isVip" value="N">关闭</label>
<input type="hidden" id="isVip" value="[[isVip||'B']]" for="radio" />
</div>
<label class="col-sm-2 control-label">预售库存</label>
<div class="col-sm-2">
<input type="number" id="stock" class="form-control" value="[[stock]]" readonly="readonly" />
</div>
</div>
[[/if]]
... ...
... ... @@ -57,9 +57,10 @@
<input type="text" class="form-control observe" data-field="limitDateFrom" jsaction="time:end:limitDateTo" id="limitDateFrom" placeholder="开始时间" value="[[limitDateFrom]]" readonly required>
</div>
<div class="col-sm-6">
<input type="text" class="form-control observe" data-field="limitDateTo" jsaction="time:start:limitDateFrom" id="limitDateTo" placeholder="结束时间" value="[[limitDateTo]]" readonly required>
<input type="text" class="form-control observe" data-field="limitDateTo" jsaction="time:start:[[useCurrTime?'limitDateCurr':'limitDateFrom']]" id="limitDateTo" placeholder="结束时间" value="[[limitDateTo]]" readonly required>
</div>
</div>
<input type="hidden" jsaction="time" id="limitDateCurr" value="[[currTime]]" readonly>
</div>
<div class="form-group">
... ...