|
@@ -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
|
}); |