Authored by weiqingting

JIT商品修改

@@ -41,7 +41,9 @@ var Bll={ @@ -41,7 +41,9 @@ var Bll={
41 }, 41 },
42 productNameArr:['','',''], 42 productNameArr:['','',''],
43 setProductName:function(){ 43 setProductName:function(){
44 - $("#productName").val(Bll.productNameArr.join("-")); 44 + if(!param){
  45 + $("#productName").val(Bll.productNameArr.join(""));
  46 + }
45 } 47 }
46 } 48 }
47 49
@@ -286,43 +288,51 @@ e.on("validate",function(){ @@ -286,43 +288,51 @@ e.on("validate",function(){
286 if((+$("#salesPriceStr").val())>(+$("#retailPriceStr").val())){ 288 if((+$("#salesPriceStr").val())>(+$("#retailPriceStr").val())){
287 return "销售价应该限定小于等于吊牌价"; 289 return "销售价应该限定小于等于吊牌价";
288 } 290 }
289 -}) 291 +});
  292 +//
  293 +
290 $(document).on("click","#btnReview",function(){ 294 $(document).on("click","#btnReview",function(){
291 - e.submit($("#basicForm").attr("action"),function(option){  
292 - var select=tabTree.getAddress();  
293 295
294 - option.data.supplierId=common.util.__input("supplierId")?$("#supplierId").val():"0";  
295 -  
296 - option.data.productSkn=param?param[2]:"";  
297 - option.data.maxSortId=select[0]?select[0].id:"";  
298 - option.data.middleSortId=select[1]?select[1].id:"";  
299 - option.data.smallSortId=select[2]?select[2].id:"";  
300 -  
301 - option.data.shopId=$("#shopId").val();  
302 - option.data.brandId=$("#brandId").val();  
303 - option.data.supplierId=$("#supplierId").val();  
304 -  
305 - option.data.isAuditing=RESPONSEDATA.isAuditing?RESPONSEDATA.isAuditing:"";  
306 -  
307 - //expectShelfTime  
308 - // option.data=new Date(expectShelfTime).getTime();  
309 -  
310 - option.data.baseGoodInfoStr=JSON.stringify(g.__rows);  
311 - // option.debug=true;  
312 - console.log(option.data);  
313 - option.success=function(res){  
314 - res = res.data;  
315 - if(res.code == "200") {  
316 - e.$tip("提交成功", function() {  
317 - location.href="/supplier/baseproduct/index"  
318 - }, 'growl-success');  
319 - }else{  
320 - e.$tip(res.message);  
321 - }  
322 - },  
323 - option.error=function(res){  
324 - e.$tip(res.message);  
325 - }  
326 - }); 296 + if(e.validate()){
  297 + common.dialog.confirm("温馨提示","<p>若是JIT商品,请务必选择供应商!</p><p>你确定提交吗?</p>",function(){
  298 + e.submit($("#basicForm").attr("action"),function(option){
  299 + var select=tabTree.getAddress();
  300 +
  301 + option.data.supplierId=common.util.__input("supplierId")?$("#supplierId").val():"0";
  302 + option.data.shopId=common.util.__input("shopId")?$("#shopId").val():"0";
  303 +
  304 + option.data.productSkn=param?param[2]:"";
  305 + option.data.maxSortId=select[0]?select[0].id:"";
  306 + option.data.middleSortId=select[1]?select[1].id:"";
  307 + option.data.smallSortId=select[2]?select[2].id:"";
  308 +
  309 + // option.data.shopId=$("#shopId").val();
  310 + option.data.brandId=$("#brandId").val();
  311 +
  312 + option.data.isAuditing=RESPONSEDATA.isAuditing?RESPONSEDATA.isAuditing:"";
  313 +
  314 + //expectShelfTime
  315 + // option.data=new Date(expectShelfTime).getTime();
  316 +
  317 + option.data.baseGoodInfoStr=JSON.stringify(g.__rows);
  318 + // option.debug=true;
  319 + console.log(option.data);
  320 + option.success=function(res){
  321 + res = res.data;
  322 + if(res.code == "200") {
  323 + e.$tip("提交成功", function() {
  324 + location.href="/supplier/baseproduct/index"
  325 + }, 'growl-success');
  326 + }else{
  327 + e.$tip(res.message);
  328 + }
  329 + },
  330 + option.error=function(res){
  331 + e.$tip(res.message);
  332 + }
  333 + });
  334 + })
  335 + }
  336 +
327 return false; 337 return false;
328 }); 338 });
@@ -143,7 +143,7 @@ @@ -143,7 +143,7 @@
143 <div class="form-group"> 143 <div class="form-group">
144 <label class="col-sm-2 control-label">商品名称<span class="red">*</span></label> 144 <label class="col-sm-2 control-label">商品名称<span class="red">*</span></label>
145 <div class="col-sm-3"> 145 <div class="col-sm-3">
146 - <input type="text" id="productName" class="form-control" value="[[productName]]" required/> 146 + <input type="text" id="productName" class="form-control" value="[[productName]]" placeholder="品牌英文名+性别+最小类目" required/>
147 </div> 147 </div>
148 <label class="col-sm-1 control-label">厂家编号</label> 148 <label class="col-sm-1 control-label">厂家编号</label>
149 <div class="col-sm-1"> 149 <div class="col-sm-1">
@@ -35,11 +35,11 @@ @@ -35,11 +35,11 @@
35 <div class="panel-col"> 35 <div class="panel-col">
36 <input type="text" id="productName" class="form-control" placeholder="商品名称" style="height: 39px;"/> 36 <input type="text" id="productName" class="form-control" placeholder="商品名称" style="height: 39px;"/>
37 </div> 37 </div>
38 - <div class="panel-col"> 38 + <!-- <div class="panel-col">
39 <select id="founder" class="form-control"> 39 <select id="founder" class="form-control">
40 - <option value="-1">供应商</option> 40 + <option value="-1">创建人</option>
41 </select> 41 </select>
42 - </div> 42 + </div> -->
43 <div class="panel-col"> 43 <div class="panel-col">
44 <select id="shopId" class="form-control"> 44 <select id="shopId" class="form-control">
45 <option value="-1">请选择店铺</option> 45 <option value="-1">请选择店铺</option>
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 </select> 76 </select>
77 </div> 77 </div>
78 78
79 - <div class="panel-col" style="width:300px"> 79 + <div class="panel-col">
80 <div id="sort"></div> 80 <div id="sort"></div>
81 </div> 81 </div>
82 <div class="panel-col"> 82 <div class="panel-col">