Authored by weiqingting

tijiao

... ... @@ -42,7 +42,7 @@ $("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA
/*类目配置*/
var ENUM={
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"barCode":"","isSuppled":"N","presaleStorageNum":""}
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"barCode":"","isSuppled":"N"}
}
/*公共模块*/
... ... @@ -212,8 +212,8 @@ var g=new common.grid({
html.push("<div class='form-group'><div class='col-sm-11 red'><input type=text value='"+item.factoryCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' /></div></div>");
html.push('<div class="rows" id="rows__'+item.__index+'">');
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
var ISXIANGO=(common.util.__input("isAdvance")=="Y"&&+RESPONSEDATA.isAuditing==200)?true:false;
html.push(common.util.__template2($("#template").html(),{index:item.__index,ISXIANGO:ISXIANGO,goodsSizeList:item.goodsSizeList}));
// var ISXIANGO=(common.util.__input("isAdvance")=="Y"&&+RESPONSEDATA.isAuditing==200)?true:false;
html.push(common.util.__template2($("#template").html(),{index:item.__index,goodsSizeList:item.goodsSizeList}));
html.push('</div>');
return html.join('');
}
... ... @@ -317,12 +317,12 @@ $(document).on("change",":radio[name=gender]",function(){
});
$(document).on("change",":radio[name=isAdvance]",function(){
g.reload();
$("#stock").val("");
$.each(g.__rows,function(inex,item){
$.each(item.goodsSizeList,function(inex1,item1){
item1.presaleStorageNum="";
});
});
// $("#stock").val("");
// $.each(g.__rows,function(inex,item){
// $.each(item.goodsSizeList,function(inex1,item1){
// item1.presaleStorageNum="";
// });
// });
if($(this).val()=="Y"){
$("#expectArrivalTimeStr").attr("required","required");
$("#expectArrivalTimeStrTxt").html("预计到货时间<span class='red'>*</span>");
... ... @@ -387,19 +387,19 @@ $(document).on("change",".btn-sort-kebu",function(){
var item=g.__rows[_index].goodsSizeList[_eq];
item.isSuppled=$(this).val();
});
$(document).on("change",".btn-sort-kucun",function(){
var _index=$(this).data("index");
var _eq=$(this).data("eq");
var item=g.__rows[_index].goodsSizeList[_eq];
item.presaleStorageNum=$(this).val();
var total=0;
$.each(g.__rows,function(index,item1){
$.each(item1.goodsSizeList,function(index,item2){
total+=(+item2.presaleStorageNum);
});
});
$("#stock").val(total);
});
// $(document).on("change",".btn-sort-kucun",function(){
// var _index=$(this).data("index");
// var _eq=$(this).data("eq");
// var item=g.__rows[_index].goodsSizeList[_eq];
// item.presaleStorageNum=$(this).val();
// var total=0;
// $.each(g.__rows,function(index,item1){
// $.each(item1.goodsSizeList,function(index,item2){
// total+=(+item2.presaleStorageNum);
// });
// });
// $("#stock").val(total);
// });
$(document).on("change",".w-goods-text",function(){
var item=g.__rows[$(this).data("index")];
item.factoryGoodsName=$(this).val();
... ...
... ... @@ -78,7 +78,7 @@ var config = {
},
apiKey: 'sd4H1ecAqlp',
port: 30016,
domain: 'http://192.168.81.6:8189/yoho-admin-portal',
domain: 'http://172.31.23.161:8088/platform',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
api: {
... ...
... ... @@ -91,11 +91,7 @@
<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>
... ... @@ -298,10 +294,6 @@
<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]]
... ...