...
|
...
|
@@ -27,23 +27,37 @@ var $ = require('jquery'), |
|
|
|
|
|
var Bll = {
|
|
|
toast:function(url) {
|
|
|
var e = new common.edit("#baseform", {bucket: "productPool"});
|
|
|
//var e = new common.edit("#baseform", {bucket: "productPool"});
|
|
|
|
|
|
|
|
|
common.dialog.confirm("添加商品池",
|
|
|
common.util.__template($("#template").html(), {}),
|
|
|
function() {
|
|
|
e.submit(url,function(option){
|
|
|
//option.data;
|
|
|
|
|
|
option.success=function(){
|
|
|
g.reload();
|
|
|
};
|
|
|
option.error=function(){
|
|
|
common.util.__ajax({
|
|
|
url:url,
|
|
|
data:{
|
|
|
poolName: $("#poolName").val(),
|
|
|
comment: $("#comment").val(),
|
|
|
producttype:$("#producttype").val(),
|
|
|
productSkns:$("#sknVal").val().replace("[", "").replace("]", "")
|
|
|
}
|
|
|
},function() {
|
|
|
g.reload();
|
|
|
});
|
|
|
});
|
|
|
|
|
|
e.init();
|
|
|
common.edit.ajaxfileupload("#productSkn",{
|
|
|
params: {
|
|
|
type: "productPool",
|
|
|
__type: "batch-import"
|
|
|
},
|
|
|
onComplete:function(res){
|
|
|
$("#sknVal").val(JSON.stringify(res.data.productSkn));
|
|
|
console.log($("#sknVal").val().replace("[", "").replace("]", ""));
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//e.init();
|
|
|
|
|
|
new common.dropDown({el: "#producttype"});
|
|
|
},
|
...
|
...
|
@@ -52,16 +66,20 @@ var $ = require('jquery'), |
|
|
title:"商品池详情",
|
|
|
content:'<div id="faGrid" style="height: 600px;overflow:auto;"></div>',
|
|
|
button:[{value:"添加", callback:function() {
|
|
|
var e = new common.edit("#base-form", {bucket: "productPool"});
|
|
|
var e = new common.edit("#base-form");
|
|
|
|
|
|
common.dialog.confirm("添加商品池记录",
|
|
|
common.util.__template($("#template1").html(), {poolId:obj.id,producttype:obj.producttype}),
|
|
|
common.util.__template($("#template1").html(),
|
|
|
{
|
|
|
poolId:obj.id,
|
|
|
producttype:grid.rows[0].producttype
|
|
|
}),
|
|
|
function() {
|
|
|
e.submit("/market/productPool/addProductPoolDetailBo",function(option){
|
|
|
//option.data;
|
|
|
|
|
|
option.success=function(){
|
|
|
g.reload();
|
|
|
grid.reload();
|
|
|
};
|
|
|
option.error=function(){
|
|
|
}
|
...
|
...
|
@@ -101,7 +119,7 @@ var $ = require('jquery'), |
|
|
grid.reload();
|
|
|
});
|
|
|
});
|
|
|
|
|
|
console.log(item);
|
|
|
});
|
|
|
}
|
|
|
};
|
...
|
...
|
|