...
|
...
|
@@ -41,8 +41,8 @@ console.log(RESPONSEDATA); |
|
|
$("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA));
|
|
|
|
|
|
/*类目配置*/
|
|
|
var ENUM={
|
|
|
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"factoryCode":"","isSuppled":"N","presaleStorageNum":""}
|
|
|
var ENUM={//"presaleStorageNum":""
|
|
|
goodsSizeList:{"sizeId":"","salePrice":$("#salesPriceStr").val(),"factoryCode":"","isSuppled":"Y"}
|
|
|
}
|
|
|
|
|
|
/*公共模块*/
|
...
|
...
|
@@ -184,17 +184,17 @@ if(!param){//RESPONSEDATA.isAuditing!=200 |
|
|
var g=new common.grid({
|
|
|
el:"#basicTable",
|
|
|
columns:[
|
|
|
{display:"分类名称",render:function(item){
|
|
|
{display:"颜色",render:function(item){
|
|
|
var html=[];
|
|
|
var txt=item.factoryGoodsName?item.factoryGoodsName:"";
|
|
|
html.push("<p>名称:<input type='text' class='w-goods-text' data-index="+item.__index+" value='"+txt+"' placeholder='分类名称' required/><p>");
|
|
|
html.push("<p>厂家颜色:<input type='text' class='w-goods-text' data-index="+item.__index+" value='"+txt+"' placeholder='分类名称' required/><p>");
|
|
|
|
|
|
html.push("<p>色系:"+item.goodsName+"<p>");
|
|
|
html.push('<button type="button" data-index='+item.__index+' class="sortdelete btn btn-danger btn-xs">删除</button>');
|
|
|
return html.join("");
|
|
|
}},
|
|
|
{
|
|
|
display:"分类图片",render:function(item){
|
|
|
display:"图片",render:function(item){
|
|
|
//goodsColorImage
|
|
|
return "<input type=file name='goodsColorImage' id='file__"+item.__index+"' value='"+item.goodsColorImage+"' />";
|
|
|
}
|
...
|
...
|
@@ -206,10 +206,12 @@ var g=new common.grid({ |
|
|
}
|
|
|
var html=[];
|
|
|
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("<dov class='rows'><div class='form-group'><div class='col-sm-2'>尺码</div><div class='col-sm-2'>销售价</div><div class='col-sm-2'>条码</div><div class='col-sm-2'>是否补货</div></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;
|
|
|
//ISXIANGO:ISXIANGO
|
|
|
html.push(common.util.__template2($("#template").html(),{index:item.__index,goodsSizeList:item.goodsSizeList}));
|
|
|
html.push('</div>');
|
|
|
return html.join('');
|
|
|
}
|
...
|
...
|
@@ -313,12 +315,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>");
|
...
|
...
|
@@ -383,19 +385,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();
|
...
|
...
|
|