Authored by weiqingting

4.5 迁移

@@ -12,6 +12,9 @@ module.exports=function(app) { @@ -12,6 +12,9 @@ module.exports=function(app) {
12 //查询店铺下关联供应商 12 //查询店铺下关联供应商
13 app.post("/MerchantShopsRest/queryMerchantSupplierByShopsId","select_queryMerchantSupplierByShopsId"); 13 app.post("/MerchantShopsRest/queryMerchantSupplierByShopsId","select_queryMerchantSupplierByShopsId");
14 14
  15 + //根据品牌获取供应商
  16 + app.post("/ShopsRest/queryShopsByBrandId", "select_queryShopsByBrandId");
  17 +
15 app.post("/product/queryMaxSortByName","select_queryMaxSortByName"); 18 app.post("/product/queryMaxSortByName","select_queryMaxSortByName");
16 /*类目 已经集成到控件里面去了注意*/ 19 /*类目 已经集成到控件里面去了注意*/
17 app.post("/product/class/queryAllProductSortList","select_queryAllMaxSortList"); 20 app.post("/product/class/queryAllProductSortList","select_queryAllMaxSortList");
@@ -59,6 +59,13 @@ module.exports={ @@ -59,6 +59,13 @@ module.exports={
59 params:[ 59 params:[
60 {name:'idName',type:'String'} 60 {name:'idName',type:'String'}
61 ] 61 ]
  62 + },
  63 + queryShopsByBrandId:{
  64 + title:'根据品牌查询店铺',
  65 + url: '/ShopsRest/queryShopsByBrandId',
  66 + params: [
  67 + {name: 'brandId',type: 'number'}
  68 + ]
62 } 69 }
63 } 70 }
64 } 71 }
@@ -58,7 +58,7 @@ module.exports=function(app) { @@ -58,7 +58,7 @@ module.exports=function(app) {
58 58
59 app.post("/product/queryMaterialList","basegoods_queryMaterialList"); 59 app.post("/product/queryMaterialList","basegoods_queryMaterialList");
60 60
61 - app.post("/product/querySortBySmallSort","basegoods_queryMaterialList"); 61 + app.post("/product/querySortBySmallSort","basegoods_querySortBySmallSort");
62 62
63 63
64 app.post("/product/checkSkuBarCodeExist","basegoods_checkSkuBarCodeExist"); 64 app.post("/product/checkSkuBarCodeExist","basegoods_checkSkuBarCodeExist");
@@ -7,7 +7,6 @@ module.exports=function(app) { @@ -7,7 +7,6 @@ module.exports=function(app) {
7 this.$extend={ 7 this.$extend={
8 moduleName:'商品管理', 8 moduleName:'商品管理',
9 pageName: '网销信息', 9 pageName: '网销信息',
10 - gridurl: '/product/queryNetSaleInforList',  
11 shopId:req.session.user.auth.shopId 10 shopId:req.session.user.auth.shopId
12 }; 11 };
13 }); 12 });
@@ -15,94 +14,104 @@ module.exports=function(app) { @@ -15,94 +14,104 @@ module.exports=function(app) {
15 app.get("/goods/netsale/batch", "goods.netsale.Batch", function (req, res){ 14 app.get("/goods/netsale/batch", "goods.netsale.Batch", function (req, res){
16 this.$extend={ 15 this.$extend={
17 moduleName: '网销信息', 16 moduleName: '网销信息',
18 - pageName: '批量设置',  
19 - domain: exports.domain 17 + pageName: '批量设置'
20 }; 18 };
21 }); 19 });
22 20
23 - app.get("/goods/netsale/info/:param", "goods.netsale.Edit", function (req, res){ 21 + app.get("/goods/netsale/info/:param", "goods.netsale.Edit","netsale_getNetSaleInfo", function (netsale,req, res){
24 this.$extend={ 22 this.$extend={
25 - type: 'info', 23 + action: 'INFOR',
26 moduleName: "网销信息", 24 moduleName: "网销信息",
27 pageName: "查看商品信息" 25 pageName: "查看商品信息"
28 }; 26 };
  27 + return netsale;
29 }); 28 });
30 29
31 - app.get("/goods/netsale/edit/:param", "goods.netsale.Edit", function (req, res){ 30 + app.get("/goods/netsale/edit/:param", "goods.netsale.Edit","netsale_getNetSaleInfo", function (netsale,req, res){
32 this.$extend={ 31 this.$extend={
33 - type: 'edit', 32 + action: 'UPDATE',
34 moduleName: "网销信息", 33 moduleName: "网销信息",
35 maintitle: "编辑商品信息" 34 maintitle: "编辑商品信息"
36 }; 35 };
  36 + return netsale;
37 }); 37 });
38 38
39 - app.get("/goods/audit/info/:param", "goods.netsale.Edit", function (req, res){  
40 - this.$extend={  
41 - type: 'info',  
42 - action: 'audit'  
43 - };  
44 - });  
45 - 39 + /**************************网销列表页面****************************/
  40 + /*网销信息列表数据*/
46 app.post("/product/queryNetSaleInforList", "netsale_queryNetSaleInforList"); 41 app.post("/product/queryNetSaleInforList", "netsale_queryNetSaleInforList");
47 42
  43 + /*网销信息tab页*/
48 app.post("/product/queryTabProductNum", "netsale_queryTabProductNum"); 44 app.post("/product/queryTabProductNum", "netsale_queryTabProductNum");
49 45
  46 + /*批量上架下架*/
50 app.post("/product/updateProductSknTimingInfo", "netsale_updateProductSknTimingInfo"); 47 app.post("/product/updateProductSknTimingInfo", "netsale_updateProductSknTimingInfo");
51 48
  49 + /*skc上下架*/
52 app.post("/product/updateGoodsStatus", "netsale_updateGoodsStatus"); 50 app.post("/product/updateGoodsStatus", "netsale_updateGoodsStatus");
53 51
  52 + /*sku上下架*/
54 app.post("/product/updateProductSkuStatus", "netsale_updateProductSkuStatus"); 53 app.post("/product/updateProductSkuStatus", "netsale_updateProductSkuStatus");
55 54
56 - app.post("/goods/netsale/getdata", "netsale_getNetSaleInfo"); 55 + /*查看网销详情*/
  56 + app.post("/product/getNetSaleInfo", "netsale_getNetSaleInfo");
57 57
  58 + /*********************************编辑**********************************/
  59 +
  60 + /*保存完整数据*/
58 app.post("/product/saveNetSaleAllInfo", "netsale_saveNetSaleAllInfo"); 61 app.post("/product/saveNetSaleAllInfo", "netsale_saveNetSaleAllInfo");
59 62
  63 + /*保存基本信息*/
60 app.post("/product/saveNetSaleBaseInfo", "netsale_saveNetSaleBaseInfo"); 64 app.post("/product/saveNetSaleBaseInfo", "netsale_saveNetSaleBaseInfo");
61 65
62 - app.post("/product/saveAfterSaleInfo", "netsale_saveAfterSaleInfo");  
63 -  
64 - app.post("/product/queryAttributesByConf", "netsale_queryAttributesByConf"); 66 + /*保存商品描述*/
  67 + app.post("/product/saveProductDesc", "netsale_saveProductDesc");
65 68
66 - app.post("/ShopsRest/queryShopsByBrandId", "netsale_queryShopsByBrandId"); 69 + /*小编推荐*/
  70 + app.post("/guang/article/queryArticlesBySKN", "netsale_queryArticlesBySKN");
67 71
68 - app.post("/product/queryMakingProcess", "netsale_queryMakingProcess"); 72 + /*小编推荐*/
  73 + app.post("/product/saveNetSaleRecommend", "netsale_saveNetSaleRecommend");
69 74
70 - app.post("/brandSeries/queryAll4Select", "netsale_queryAll4Select"); 75 + /*搭配模块*/
  76 + app.post("/collocation/selectCollocationListBySkn", "netsale_selectCollocationListBySkn");
71 77
72 - app.post("/product/saveBrandRelation", "netsale_saveBrandRelation"); 78 + app.post("/collocation/selectCollocationById", "netsale_selectCollocationById");
73 79
74 - app.post("/product/saveNetSaleVideo", "netsale_saveNetSaleVideo"); 80 + app.post("/collocation/insertCollocation", "netsale_insertCollocation");
75 81
76 - app.post("/article/queryArticlesBySKN", "netsale_queryArticlesBySKN"); 82 + app.post("/collocation/updateCollocation", "netsale_updateCollocation");
77 83
78 - app.post("/erpproduct/brands/queryBrandsByStatus", "netsale_queryBrandsByStatus"); 84 + app.post("/collocation/delCollocationById", "netsale_delCollocationById");
79 85
80 - app.post("/product/queryAttributesByConfEx", "netsale_queryAttributesByConfEx");  
81 86
  87 + /*封面*/
82 app.post("/productPhoto/queryProductPhotoList", "netsale_queryProductPhotoList"); 88 app.post("/productPhoto/queryProductPhotoList", "netsale_queryProductPhotoList");
83 89
84 - app.post("/product/saveSearchSort", "netsale_saveSearchSort"); 90 + /*单独维护封面信息*/
  91 + app.post("/product/manageProductImg", "netsale_manageProductImg");
85 92
  93 + /*搜索关键词*/
86 app.post("/searchWords/queryHotSearchTerms", "netsale_queryHotSearchTerms"); 94 app.post("/searchWords/queryHotSearchTerms", "netsale_queryHotSearchTerms");
87 - 95 + /*保存关键词*/
88 app.post("/product/saveNetSaleSearchKeys", "netsale_saveNetSaleSearchKeys"); 96 app.post("/product/saveNetSaleSearchKeys", "netsale_saveNetSaleSearchKeys");
89 97
90 - app.post("/product/saveProductParam", "netsale_saveProductParam");  
91 -  
92 - app.post("/product/saveProductDesc", "netsale_saveProductDesc"); 98 + app.post("/productSize/queryProdSizeList","netsale_queryProdSizeList")
93 99
94 - app.post("/product/saveNetSaleRecommend", "netsale_saveNetSaleRecommend");  
95 -  
96 - app.post("/collocation/selectCollocationListBySkn", "netsale_selectCollocationListBySkn"); 100 + app.post("/productSize/saveProdSizeInfo","netsale_saveProdSizeInfo");
97 101
98 - app.post("/collocation/selectCollocationById", "netsale_selectCollocationById"); 102 + app.post("/product/saveSearchSort", "netsale_saveSearchSort");
99 103
100 - app.post("/collocation/insertCollocation", "netsale_insertCollocation"); 104 + /*保存上架后补全信息*/
  105 + app.post("/product/saveAfterSaleInfo","netsale_saveAfterSaleInfo")
  106 + /*查询补全信息*/
  107 + app.post("/product/queryAttributesByConf","netsale_queryAttributesByConf");
101 108
102 - app.post("/collocation/updateCollocation", "netsale_updateCollocation"); 109 + app.post("/standard/queryAllBySortId4Html","netsale_queryAllBySortId4Html");
103 110
104 - app.post("/collocation/delCollocationById", "netsale_delCollocationById"); 111 + /*商品参数*/
  112 + app.post("/product/queryAttributesByConfEx","netsale_queryAttributesByConfEx");
105 113
106 - app.post("/product/manageProductImg", "netsale_manageProductImg"); 114 + app.post("/product/queryMaterialList","netsale_queryMaterialList");
107 115
  116 + app.post("/product/saveProductParam","netsale_saveProductParam");
108 } 117 }
@@ -66,36 +66,30 @@ module.exports={ @@ -66,36 +66,30 @@ module.exports={
66 title: "批量skn处理", 66 title: "批量skn处理",
67 url: "/product/updateProductSknTimingInfo", 67 url: "/product/updateProductSknTimingInfo",
68 params: [ 68 params: [
69 - {name: 'productSknList',type: 'string'},  
70 - {name: 'type',type: 'number'},  
71 - {name: 'outSaleTime',type: 'number'},  
72 - {name: 'shelveTime',type: 'string'},  
73 - {name: 'onNewTime',type: 'string'},  
74 - {name: 'advanceBeginTime',type: 'string'},  
75 - {name: 'advanceEndTime',type: 'string'} 69 + {name: 'productSknList',type: 'string'},
  70 + {name: 'type',type: 'number'},
  71 + {name: 'outSaleTime',type: 'number'},
  72 + {name: 'shelveTime',type: 'string'},
  73 + {name: 'onNewTime',type: 'string'},
  74 + {name: 'advanceBeginTime',type: 'string'},
  75 + {name: 'advanceEndTime',type: 'string'}
76 ] 76 ]
77 }, 77 },
78 updateGoodsStatus:{ 78 updateGoodsStatus:{
79 title: "skc上下架", 79 title: "skc上下架",
80 url: "/product/updateGoodsStatus", 80 url: "/product/updateGoodsStatus",
81 - params: [{  
82 - name: 'productSkc',  
83 - type: 'number'  
84 - }, {  
85 - name: 'targetStatus',  
86 - type: 'number'  
87 - }] 81 + params: [
  82 + {name: 'productSkc',type: 'number'},
  83 + {name: 'targetStatus',type: 'number'}
  84 + ]
88 }, 85 },
89 updateProductSkuStatus:{ 86 updateProductSkuStatus:{
90 title: "sku上下架", 87 title: "sku上下架",
91 url: "/product/updateProductSkuStatus", 88 url: "/product/updateProductSkuStatus",
92 - params: [{  
93 - name: 'productSku',  
94 - type: 'number'  
95 - }, {  
96 - name: 'targetStatus',  
97 - type: 'number'  
98 - }] 89 + params: [
  90 + {name: 'productSku',type: 'number'},
  91 + {name: 'targetStatus',type: 'number'}
  92 + ]
99 }, 93 },
100 getNetSaleInfo:{ 94 getNetSaleInfo:{
101 title:'查询网销详情', 95 title:'查询网销详情',
@@ -103,6 +97,224 @@ module.exports={ @@ -103,6 +97,224 @@ module.exports={
103 params:[ 97 params:[
104 {name:'param',type: 'number'} 98 {name:'param',type: 'number'}
105 ] 99 ]
  100 + },
  101 + saveNetSaleAllInfo:{
  102 + title:'保存完整网销信息',
  103 + url: '/product/saveNetSaleAllInfo',
  104 + params: [
  105 + {name: 'productSkn',type: 'number'},
  106 + {name: 'productName',type: 'string'},
  107 + {name: 'isNew',type: 'string'},
  108 + {name: 'sellChannels',type: 'string'},
  109 + {name: 'phrase',type: 'string'},
  110 + {name: 'outSaleTime',type: 'string'},
  111 + {name: 'shopIds',type: 'string'},
  112 + {name: 'productDesc',type: 'string'},
  113 + {name: 'vedioUrl',type: 'string'},
  114 + {name: 'recommend',type: 'string'},
  115 + {name: 'brandModel',type: 'string'},
  116 + {name: 'brandSeries',type: 'string'},
  117 + {name: 'makeCrafts',type: 'string'},
  118 + {name: 'pattern',type: 'string'},
  119 + {name: 'style',type: 'string'},
  120 + {name: 'salesPhrase',type: 'string'},
  121 + {name: 'isHostsell',type: 'string'},
  122 + {name: 'wearSense',type: 'string'},
  123 + {name: 'searchSortList',type: 'string'},
  124 + {name: 'searchKeys',type: 'string'},
  125 + {name: 'brandRelationList',type: 'string'},
  126 + {name: 'attributeProValuesOne',type: 'string'},
  127 + {name: 'attributeProValuesTwo',type: 'string'},
  128 + {name: 'goodsImagesReq',type: 'string'},
  129 + {name: 'productStandardRelationStr',type: 'string'},
  130 + {name: 'productMaterial',type: 'string'}
  131 + ]
  132 + },
  133 + saveNetSaleBaseInfo:{
  134 + title:'保存基本信息接口',
  135 + url: '/product/saveNetSaleBaseInfo',
  136 + params: [
  137 + {name: 'productSkn',type: 'number'},
  138 + {name: 'productName',type: 'string'},
  139 + {name: 'isNew',type: 'string'},
  140 + {name: 'sellChannels',type: 'string'},
  141 + {name: 'phrase',type: 'string'},
  142 + {name: 'outSaleTime',type: 'number'},
  143 + {name: 'shopIds',type: 'string'}
  144 + ]
  145 + },
  146 + saveAfterSaleInfo:{
  147 + title:'保存上架后补全信息',
  148 + url: '/product/saveAfterSaleInfo',
  149 + params: [
  150 + {name: 'productSkn',type: 'number'},
  151 + {name: 'brandModel',type: 'string'},
  152 + {name: 'brandSeries',type: 'string'},
  153 + {name: 'makeCrafts',type: 'string'},
  154 + {name: 'salesPhrase',type: 'string'},
  155 + {name: 'isHostsell',type: 'string'},
  156 + {name: 'wearSense',type: 'string'},
  157 + {name: 'attributeProValuesTwo',type: 'string'}
  158 + ]
  159 + },
  160 + queryAttributesByConf:{
  161 + title:'查询补全信息',
  162 + url: '/product/queryAttributesByConf',
  163 + params: [
  164 + {name: 'categoryId',type: 'number'},
  165 + {name: 'displayPosition',type: 'number'},
  166 + {name: 'saleType',type: 'number'}
  167 + ]
  168 + },
  169 + saveProductDesc:{
  170 + title:'商品描述',
  171 + url: '/product/saveProductDesc',
  172 + params: [
  173 + {name: 'productSkn',type: 'Number'},
  174 + {name: 'productDesc',type: 'String'}
  175 + ]
  176 + },
  177 + queryArticlesBySKN:{
  178 + title:'小编推荐',
  179 + url: '/guang/article/queryArticlesBySKN',
  180 + params: [
  181 + {name: 'productSkn',type: 'string'}
  182 + ]
  183 + },
  184 + selectCollocationListBySkn:{
  185 + title:'查询搭配列表',
  186 + url:'/collocation/selectCollocationListBySkn',
  187 + params: [
  188 + {name: 'productSkn',type: 'Number'},
  189 + {name: 'page',type: 'Number'},
  190 + {name: 'size',type: 'Number'}
  191 + ]
  192 + },
  193 + selectCollocationById:{
  194 + title:'获取单个搭配',
  195 + url: '/collocation/selectCollocationById',
  196 + params: [
  197 + {name: 'param',type: 'Number'}
  198 + ]
  199 + },
  200 + insertCollocation:{
  201 + title:'添加单个搭配',
  202 + url: '/collocation/insertCollocation',
  203 + params: [
  204 + {name: 'productSkn',type: 'Number'},
  205 + {name: 'imageUrl',type: 'String'},
  206 + {name: 'content',type: 'String'},
  207 + {name: 'infoStr',type: 'String'}
  208 + ]
  209 + },
  210 + updateCollocation:{
  211 + title:'更新单个搭配',
  212 + url: '/collocation/updateCollocation',
  213 + params: [
  214 + {name: 'id',type: 'Number'},
  215 + {name: 'imageUrl',type: 'String'},
  216 + {name: 'content',type: 'String'},
  217 + {name: 'infoStr',type: 'String'}
  218 + ]
  219 + },
  220 + delCollocationById:{
  221 + title:'删除单个搭配',
  222 + url: '/collocation/delCollocationById',
  223 + params: [
  224 + {name: 'param',type: 'Number'}
  225 + ]
  226 + },
  227 + queryProductPhotoList:{
  228 + title:'调用图片',
  229 + url: '/productPhoto/queryProductPhotoList',
  230 + params: [
  231 + {name: 'productSkn',type: 'number'},
  232 + {name: 'productSkc',type: 'number'},
  233 + {name: 'productSku',type: 'number'},
  234 + {name: 'startTime',type: 'number'},
  235 + {name: 'endTime',type: 'number'}
  236 + ]
  237 + },
  238 + manageProductImg:{
  239 + title:'单独维护封面信息',
  240 + url: '/product/manageProductImg',
  241 + params: [
  242 + {name: 'goodsImagesReq',type: 'string'}
  243 + ]
  244 + },
  245 + queryHotSearchTerms:{
  246 + title:'查找热搜词',
  247 + url: '/searchWords/queryHotSearchTerms',
  248 + params: [
  249 + {name: 'page',type: 'number'},
  250 + {name: 'size',type: 'number'}
  251 + ]
  252 + },
  253 + saveNetSaleSearchKeys:{
  254 + title:'保存搜索关键词',
  255 + url: '/product/saveNetSaleSearchKeys',
  256 + params: [
  257 + {name: 'productSkn',type: 'number'},
  258 + {name: 'searchKeys',type: 'string'}
  259 + ]
  260 + },
  261 + queryProdSizeList:{
  262 + title:'拍摄复尺列表',
  263 + url: '/productSize/queryProdSizeList',
  264 + params: [
  265 + {name: "page",type: "number"},
  266 + {name: "productSkn",type: "number"},
  267 + {name: "brandId",type: "number"},
  268 + {name: "productSku",type: "number"},
  269 + {name: "maxSortId",type: "number"},
  270 + {name: "arriveStartTime",type: "number"},
  271 + {name: "arriveEndTime",type: "number"},
  272 + {name: "isMeasure",type: "string"}
  273 + ]
  274 + },
  275 + saveProdSizeInfo:{
  276 + title:'保存拍摄复尺',
  277 + url: '/productSize/saveProdSizeInfo',
  278 + params: [
  279 + {name: "productSkn",type: "number"},
  280 + {name: "sizeInfoList",type: "string"},
  281 + {name: "productSizeReferList",type: "string"},
  282 + {name: "noMeasureIds",type: "string"}
  283 + ]
  284 + },
  285 + queryAllBySortId4Html:{
  286 + title:'',
  287 + url: '/standard/queryAllBySortId4Html',
  288 + params: [
  289 + {name: 'param',type: 'Number'},
  290 + {name: 'displayPosition',type: 'Number'}
  291 + ]
  292 + },
  293 + queryAttributesByConfEx:{
  294 + title:'商品参数',
  295 + url: '/product/queryAttributesByConfEx',
  296 + params: [
  297 + {name: 'categoryId',type: 'number'},
  298 + {name: 'displayPosition',type: 'number'},
  299 + {name: 'saleType',type: 'number'}
  300 + ]
  301 + },
  302 + queryMaterialList:{
  303 + title:'',
  304 + url: '/product/queryMaterialList',
  305 + params: [
  306 + {name: 'categoryId',type: 'Number'}
  307 + ]
  308 + },
  309 + saveProductParam:{
  310 + title:'保存商品参数',
  311 + url: '/product/saveProductParam',
  312 + params: [
  313 + {name: 'productSkn',type: 'number'},
  314 + {name: 'attributeProValuesOne',type: 'string'},
  315 + {name: 'productStandardRelationStr',type: 'string'},
  316 + {name: 'productMaterial',type: 'string'}
  317 + ]
106 } 318 }
107 } 319 }
108 -}  
  320 +}
1 <%include '../../../common/views/__ui/header'%> 1 <%include '../../../common/views/__ui/header'%>
2 -<div class="pageheader">  
3 - <div class="media">  
4 - <div class="pageicon pull-left">  
5 - <i class="fa fa-th-list"></i>  
6 - </div>  
7 - <div class="media-body">  
8 - <ul class="breadcrumb">  
9 - <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>  
10 - <li><a href="">商品管理</a></li>  
11 - <li>  
12 - <%secondTitle%>  
13 - <%pageTitle%>  
14 - </li>  
15 - </ul>  
16 -  
17 - </div>  
18 - </div>  
19 -</div> 2 +<%include '../../../common/views/__partail/ListHeader'%>
20 3
21 <div class="contentpanel"> 4 <div class="contentpanel">
22 <div class="panel panel-default" style="margin-bottom:10px;"> 5 <div class="panel panel-default" style="margin-bottom:10px;">
1 <%include '../../../common/views/__ui/header'%> 1 <%include '../../../common/views/__ui/header'%>
2 -<div class="pageheader">  
3 - <div class="media">  
4 - <div class="pageicon pull-left">  
5 - <i class="fa fa-th-list"></i>  
6 - </div>  
7 - <div class="media-body">  
8 - <ul class="breadcrumb">  
9 - <li><a href="#"><i class="glyphicon glyphicon-home"></i></a></li>  
10 - <li><a href="#">商品管理</a></li>  
11 -  
12 -  
13 - <li><%maintitle%></li>  
14 - </ul>  
15 - </div>  
16 - </div>  
17 -</div> 2 +<%include '../../../common/views/__partail/ListHeader'%>
18 <form id="netsaleAllInfo" class="form-horizontal form-bordered"> 3 <form id="netsaleAllInfo" class="form-horizontal form-bordered">
19 - <div class="contentpanel" data-action="<%action%>" data-type="<%type%>"> 4 + <div class="contentpanel" data-action="<%action%>">
20 5
21 <input id="productSkn" type="hidden"> 6 <input id="productSkn" type="hidden">
22 <div class="panel panel-primary"> 7 <div class="panel panel-primary">
@@ -39,7 +24,7 @@ @@ -39,7 +24,7 @@
39 24
40 </div> 25 </div>
41 26
42 - <%include 'partials/search_key'%> 27 + <%include 'partials/search-key'%>
43 28
44 <div class="panel panel-primary"> 29 <div class="panel panel-primary">
45 <div class="panel-heading"> 30 <div class="panel-heading">
@@ -64,8 +49,6 @@ @@ -64,8 +49,6 @@
64 49
65 <div class="footpanel" style="text-align: center;"> 50 <div class="footpanel" style="text-align: center;">
66 <a id="saveAllInfo" href="javascript:;" class="btn btn-primary btn-lg">保存</a> 51 <a id="saveAllInfo" href="javascript:;" class="btn btn-primary btn-lg">保存</a>
67 - <a id="passBtn" href="javascript:;" class="btn btn-primary btn-lg">通过</a>  
68 - <a id="rejectBtn" href="javascript:;" class="btn btn-primary btn-lg">驳回</a>  
69 <a id="backBtn" href="javascript:;" onclick="history.go(-1)" class="btn btn-default btn-lg">返回</a> 52 <a id="backBtn" href="javascript:;" onclick="history.go(-1)" class="btn btn-default btn-lg">返回</a>
70 </div> 53 </div>
71 54
@@ -110,7 +93,7 @@ @@ -110,7 +93,7 @@
110 <div class="pull-left ml10"> 93 <div class="pull-left ml10">
111 <input class="form-control" id="imgVideoText" type="text" placeholder="{name}链接" value="{attachUrl}"> 94 <input class="form-control" id="imgVideoText" type="text" placeholder="{name}链接" value="{attachUrl}">
112 </div> 95 </div>
113 - 96 +
114 </div> 97 </div>
115 <div class="row"> 98 <div class="row">
116 <label class="pull-left control-label height40">{name}描述</label> 99 <label class="pull-left control-label height40">{name}描述</label>
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 <div class="panel-col2"> 18 <div class="panel-col2">
19 <input id="productName" class="form-control panel-input" type="text" placeholder="商品名称"> 19 <input id="productName" class="form-control panel-input" type="text" placeholder="商品名称">
20 </div> 20 </div>
21 - 21 +
22 <div class="panel-col"> 22 <div class="panel-col">
23 <select name="brandId" id="brandId" tabindex="-1" title="" class="form-control"> 23 <select name="brandId" id="brandId" tabindex="-1" title="" class="form-control">
24 <option value="-1">请选择品牌</option> 24 <option value="-1">请选择品牌</option>
@@ -135,7 +135,6 @@ @@ -135,7 +135,6 @@
135 135
136 </div> 136 </div>
137 137
138 -<input type="hidden" id="gridurl" value="<%gridurl%>">  
139 <input type="hidden" id="shopId" value="<%shopId%>"> 138 <input type="hidden" id="shopId" value="<%shopId%>">
140 <script type="text/template" id="onshelve-template"> 139 <script type="text/template" id="onshelve-template">
141 <form class="shelve-form form-horizontal "> 140 <form class="shelve-form form-horizontal ">
@@ -145,7 +144,7 @@ @@ -145,7 +144,7 @@
145 <div class="form-group"> 144 <div class="form-group">
146 <div class="col-sm-3 height40">预上架时间:</div> 145 <div class="col-sm-3 height40">预上架时间:</div>
147 <div class="col-sm-6"><input id="shelveTime" class="form-control" jsaction="time" type="text" placeholder="预上架时间" readonly> 146 <div class="col-sm-6"><input id="shelveTime" class="form-control" jsaction="time" type="text" placeholder="预上架时间" readonly>
148 - <span class="red">商家请填写时间</span> 147 + <span class="red">上架请填写上架时间</span>
149 </div> 148 </div>
150 </div> 149 </div>
151 <div class="form-group"> 150 <div class="form-group">
@@ -24,9 +24,6 @@ @@ -24,9 +24,6 @@
24 24
25 <script type="text/template" id="basicInfo"> 25 <script type="text/template" id="basicInfo">
26 <div class="form-group"> 26 <div class="form-group">
27 - <blockquote>基本信息</blockquote>  
28 - </div>  
29 - <div class="form-group">  
30 <div class="col-sm-3">店铺:[[shopName]]</div> 27 <div class="col-sm-3">店铺:[[shopName]]</div>
31 <div class="col-sm-3">品牌:[[brandName]]</div> 28 <div class="col-sm-3">品牌:[[brandName]]</div>
32 <div class="col-sm-3">供应商:[[supplierName]]</div> 29 <div class="col-sm-3">供应商:[[supplierName]]</div>
@@ -78,7 +75,9 @@ @@ -78,7 +75,9 @@
78 </div> 75 </div>
79 <div class="form-group"> 76 <div class="form-group">
80 <div class="col-sm-3">是否预售:[[isAdvance]]</div> 77 <div class="col-sm-3">是否预售:[[isAdvance]]</div>
  78 + [[if isAdvance=='是']]
81 <div class="col-sm-3" style="color: #ccc;">预售库存:[[stock]]</div> 79 <div class="col-sm-3" style="color: #ccc;">预售库存:[[stock]]</div>
  80 + [[/if]]
82 <div class="col-sm-3">预计到货时间:[[expectArrivalTime]]</div> 81 <div class="col-sm-3">预计到货时间:[[expectArrivalTime]]</div>
83 </div> 82 </div>
84 <div class="form-group"> 83 <div class="form-group">
@@ -98,9 +97,6 @@ @@ -98,9 +97,6 @@
98 97
99 <script type="text/template" id="productExtBoTemp"> 98 <script type="text/template" id="productExtBoTemp">
100 <div class="form-group"> 99 <div class="form-group">
101 - <blockquote>上架必填</blockquote>  
102 - </div>  
103 - <div class="form-group">  
104 <div class="col-sm-12"> 100 <div class="col-sm-12">
105 <label>商品短评<i class="red">*</i>:</label> 101 <label>商品短评<i class="red">*</i>:</label>
106 [[if renderType=='edit']] 102 [[if renderType=='edit']]
1 -<div class="panel panel-default">  
2 - <div class="panel-heading">  
3 - <a class="netsale-position" href="javascript:;" name="position11"></a>  
4 - <div class="panel-btns" style="display: none;">  
5 - <a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>  
6 - </div>  
7 - <h2 class="panel-title">(商品)品牌关联</h2>  
8 - </div>  
9 - <div id="brandWrap" class="panel-body">  
10 - <div class="form-group selected-brand" style="min-height: 60px;"></div>  
11 - <div id="brand-list" class="form-group brand-list"></div>  
12 - </div>  
13 - <div class="panel-footer">  
14 - <a id="saveBrandRelation" href="javascript:;" class="btn btn-primary">保存</a>  
15 - </div>  
16 -</div>  
17 -  
18 -<script type="text/template" id="brandTemp">  
19 - [[each map as item index]]  
20 - <div class="form-group">  
21 - <div class="col-sm-1" style="text-align:center;">[[index]]</div>  
22 - <div class="col-sm-10">  
23 - [[each item as a index]]  
24 - <div class="col-sm-2">  
25 - <label style="width:80%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor: pointer;">  
26 - <input name="brandRelationList" type="checkbox" value="[[a.id]]" data-name="[[a.brandName]]">  
27 - [[a.brandName]]  
28 - </label>  
29 - </div>  
30 - [[/each]]  
31 - </div>  
32 - </div>  
33 - [[/each]]  
34 -</script>  
35 -<script type="text/template" id="brandShowTemp">  
36 - <input id="brandRelationList" type="hidden" value="[[brandRelation]]" for="checkbox">  
37 - [[each brandRelationList as a index]]  
38 - <div class="col-sm-2" data-id="[[a.brandId]]">[[a.brandName]]</div>  
39 - [[/each]]  
40 -</script>  
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <div class="panel-btns" style="display: none;"> 5 <div class="panel-btns" style="display: none;">
6 <a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a> 6 <a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>
7 </div> 7 </div>
8 - <h2 class="panel-title">小编推荐</h2> 8 + <a id="recommender"><h2 class="panel-title">小编推荐</h2></a>
9 </div> 9 </div>
10 <div id="recommenderWrap" class="panel-body nopadding"> 10 <div id="recommenderWrap" class="panel-body nopadding">
11 <script id="edit-recommender" type="text/plain" style="width:100%;height:500px;"></script> 11 <script id="edit-recommender" type="text/plain" style="width:100%;height:500px;"></script>
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 26
27 <script type="text/template" id="guangWrapTemp"> 27 <script type="text/template" id="guangWrapTemp">
28 [[each data as a index]] 28 [[each data as a index]]
29 - <div class="col-sm-6"> 29 + <div class="col-sm-4">
30 <h4>[[a.sortName]]</h4> 30 <h4>[[a.sortName]]</h4>
31 [[each a.articleList as b index]] 31 [[each a.articleList as b index]]
32 <p><a target="_blank" href="[[b.url]]">[[b.articleTitle]]</a></p> 32 <p><a target="_blank" href="[[b.url]]">[[b.articleTitle]]</a></p>
@@ -35,21 +35,25 @@ @@ -35,21 +35,25 @@
35 </div> 35 </div>
36 <div class="cover-color"> 36 <div class="cover-color">
37 [[if _item.isDefault=="Y"]] 37 [[if _item.isDefault=="Y"]]
38 - <a href="javascript:;" class="btn btn-default btn-metro info">默认</a> 38 + <a href="javascript:;" class="btn btn-default btn-metro info" data-i="0">默认</a>
39 [[else]] 39 [[else]]
40 - <a href="javascript:;" class="btn btn-default btn-metro">默认</a> 40 + <a href="javascript:;" class="btn btn-default btn-metro" data-i="0">默认</a>
41 [[/if]] 41 [[/if]]
42 42
43 - [[if _item.genderCover==1]]  
44 - <a href="javascript:;" class="btn btn-default btn-metro info">男封</a> 43 + [[if gender==1||gender==3]]
  44 + [[if _item.genderCover==1||_item.genderCover==3]]
  45 + <a href="javascript:;" class="btn btn-default btn-metro info" data-i="1">男封</a>
45 [[else]] 46 [[else]]
46 - <a href="javascript:;" class="btn btn-default btn-metro">男封</a> 47 + <a href="javascript:;" class="btn btn-default btn-metro" data-i="1">男封</a>
  48 + [[/if]]
47 [[/if]] 49 [[/if]]
48 50
49 - [[if _item.genderCover==2]]  
50 - <a href="javascript:;" class="btn btn-default btn-metro info">女封</a> 51 + [[if gender==2||gender==3]]
  52 + [[if _item.genderCover==2||_item.genderCover==3]]
  53 + <a href="javascript:;" class="btn btn-default btn-metro info" data-i="2">女封</a>
51 [[else]] 54 [[else]]
52 - <a href="javascript:;" class="btn btn-default btn-metro">女封</a> 55 + <a href="javascript:;" class="btn btn-default btn-metro" data-i="2">女封</a>
  56 + [[/if]]
53 [[/if]] 57 [[/if]]
54 </div> 58 </div>
55 </li> 59 </li>
@@ -66,33 +70,12 @@ @@ -66,33 +70,12 @@
66 <div class="fm-side col-sm-2">商品封面:</div> 70 <div class="fm-side col-sm-2">商品封面:</div>
67 <div class="cover-goods col-sm-10"> 71 <div class="cover-goods col-sm-10">
68 [[if item.isDefault=="Y"]] 72 [[if item.isDefault=="Y"]]
69 - <a href="javascript:;" class="btn-goods-cover btn btn-default btn-metro info" data-index=[[index]]>设置默认</a> 73 + <a href="javascript:;" class="btn-goods-cover btn btn-default info" data-index=[[index]]>设置默认</a>
70 [[else]] 74 [[else]]
71 - <a href="javascript:;" class="btn-goods-cover btn btn-default btn-metro" data-index=[[index]]>设置默认</a> 75 + <a href="javascript:;" class="btn-goods-cover btn btn-default" data-index=[[index]]>设置默认</a>
72 [[/if]] 76 [[/if]]
73 - <a href="javascript:;" class="btn-use-img btn btn-default btn-metro" data-productSkc="[[item.productSkc]]" data-index="[[index]]">调用图片</a> 77 + <a href="javascript:;" class="btn-use-img btn btn-default" data-productSkc="[[item.productSkc]]" data-index="[[index]]">调用图片</a>
74 </div> 78 </div>
75 </div> 79 </div>
76 [[/each]] 80 [[/each]]
77 </script> 81 </script>
78 -<script type="text/template" id="fenmianImgTemp">  
79 - <li class="cover-image-item fileinput-button" data-index=[[__index]]>  
80 - <div class="goods-img">  
81 - <a class="fileinput-button-icon" href="javascript:void(0);"><img src="[[imageUrl]]"></a>  
82 - <i class="remove-item-btn glyphicon glyphicon-remove-circle"></i>  
83 - </div>  
84 - <div class="cover-color">  
85 - <a href="javascript:;" class="btn btn-default btn-metro">默认</a>  
86 - <a href="javascript:;" class="btn btn-default btn-metro">男封</a>  
87 - <a href="javascript:;" class="btn btn-default btn-metro">女封</a>  
88 - </div>  
89 - </li>  
90 -</script>  
91 -  
92 -<!-- <script type="text/template" id="colorCoverTemp">  
93 - <div class="cover-color-box height40">  
94 - <a href="javascript:;" class="btn btn-default btn-metro">默认</a>  
95 - <a href="javascript:;" class="btn btn-default btn-metro">男封</a>  
96 - <a href="javascript:;" class="btn btn-default btn-metro">女封</a>  
97 - </div>  
98 -</script> -->  
@@ -20,52 +20,6 @@ @@ -20,52 +20,6 @@
20 </div> 20 </div>
21 </div> 21 </div>
22 22
23 -<!-- <script type="text/template" id="material-params">  
24 - <label class="col-sm-2 control-label">材质</label>  
25 - <div class="col-sm-8 height40">  
26 - [[each data as item index]]  
27 - <label style="cursor: pointer;"><input type="checkbox" name="material" class="material" value=[[item.id]]>[[item.text]]</label>  
28 - [[/each]]  
29 - </div>  
30 - <input type="hidden" id="material" value="{material}" for="checkbox">  
31 -  
32 -</script>  
33 -  
34 -<script type="text/template" id="washTip-params">  
35 - <label class="col-sm-2 control-label">洗涤提示</label>  
36 - <div class="col-sm-8 height40">  
37 - [[each data as item index]]  
38 - <label style="cursor: pointer;"><input type="checkbox" name="washTips" class="washTips" value=[[item.id]]>[[item.text]]</label>  
39 - [[/each]]  
40 - </div>  
41 - <input type="hidden" id="washTips" value="{washTips}" for="checkbox">  
42 -</script> -->  
43 -  
44 -<!-- <script type="text/template" id="goodsParamTemp">  
45 - [[each data as b index]]  
46 - [[if b.idNameList && b.idNameList.length>0]]  
47 - <div class="goods-param-group form-group">  
48 - <label>[[b.attributeName]]:</label>  
49 - [[if b.inputType=='select']]  
50 - <div style="display: inline-block;width: 280px;">  
51 - <select class="form-control" id="[[b.attributeId]]" value="[[b.selectedValues||'']]">  
52 - [[each b.idNameList as c index]]  
53 - <option value="[[c.id]]">[[c.text]]</option>  
54 - [[/each]]  
55 - </select>  
56 - </div>  
57 - [[else]]  
58 - <span>  
59 - [[each b.idNameList as c index]]  
60 - <label style="cursor: pointer;"><input name="[[b.attributeId]]" type="[[b.inputType]]" value="[[c.id]]">[[c.text]]</label>  
61 - [[/each]]  
62 - </span>  
63 - <input id="[[b.attributeId]]" type="hidden" for="[[b.inputType]]" value="[[b.selectedValues||'']]" placeholder="[[b.attributeName]]" required>  
64 - [[/if]]  
65 - </div>  
66 - [[/if]]  
67 - [[/each]]  
68 -</script> -->  
69 23
70 <script type="text/template" id="template33"> 24 <script type="text/template" id="template33">
71 <div class="form-group"> 25 <div class="form-group">
1 <div class="panel panel-primary"> 1 <div class="panel panel-primary">
2 - <div class="panel-heading"> 2 + <div class="panel-heading">
3 <a class="netsale-position" href="javascript:;" name="position8"></a> 3 <a class="netsale-position" href="javascript:;" name="position8"></a>
4 - <div class="panel-btns" style="display: none;">  
5 - <a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>  
6 - </div>  
7 - <h2 class="panel-title">搜索关键词</h2>  
8 - </div> 4 + <div class="panel-btns" style="display: none;">
  5 + <a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>
  6 + </div>
  7 + <h2 class="panel-title">搜索关键词</h2>
  8 + </div>
9 9
10 - <div class="panel-body">  
11 - <div class="form-group"> 10 + <div class="panel-body">
  11 + <div class="form-group">
12 <label class="col-sm-1 control-label height40" for="searchKeys">商品关键词</label> 12 <label class="col-sm-1 control-label height40" for="searchKeys">商品关键词</label>
13 <div class="col-sm-6"> 13 <div class="col-sm-6">
14 <input type="text" class="form-control" id="searchKeys" required="required" /> 14 <input type="text" class="form-control" id="searchKeys" required="required" />
@@ -17,13 +17,13 @@ @@ -17,13 +17,13 @@
17 <div class="height40" style="color: red;">每个关键词请用英文“,”隔开</div> 17 <div class="height40" style="color: red;">每个关键词请用英文“,”隔开</div>
18 </div> 18 </div>
19 <div class="form-group" id="search-key-list"> 19 <div class="form-group" id="search-key-list">
20 - <label class="col-sm-1 control-label height40">搜索热词:</label>  
21 - <div class="col-sm-6" id="search-key">  
22 -  
23 - </div> 20 + <label class="col-sm-1 control-label height40">搜索热词:</label>
  21 + <div class="col-sm-6" id="search-key">
  22 +
  23 + </div>
24 </div> 24 </div>
25 </div> 25 </div>
26 - <div class="panel-footer">  
27 - <button class="btn btn-primary" id="save-searchKey">保存</button>  
28 - </div> 26 + <div class="panel-footer">
  27 + <button class="btn btn-primary" id="save-searchKey">保存</button>
  28 + </div>
29 </div> 29 </div>
1 -<div class="panel panel-default">  
2 - <div class="panel-heading">  
3 - <div class="panel-btns" style="display: none;">  
4 - <a href="" class="panel-minimize tooltips" data-toggle="tooltip" title=""><i class="fa fa-minus"></i></a>  
5 - </div>  
6 - <h2 class="panel-title">视频</h2>  
7 - </div>  
8 - <div class="panel-body">  
9 - <h4>请上传视频</h4>  
10 - <div class="video-file-wrap">  
11 -  
12 - </div>  
13 -  
14 - </div>  
15 - <div class="panel-footer">  
16 - <a id="saveVideo" href="javascript:;" class="btn btn-primary">保存</a>  
17 - </div>  
18 -</div>  
1 'use strict'; 1 'use strict';
2 var $ = require('jquery'), 2 var $ = require('jquery'),
3 - common = require('../common/common');  
4 -require('../util/custom.js'); 3 + common=require('../../common/common');
5 /* 4 /*
6 * 获取业务数据 5 * 获取业务数据
7 */ 6 */
8 -window.NETSALEDATA = null;  
9 -var param = location.href.match(/(edit|info)\/(\d+)/)[2];  
10 -  
11 -common.util.__ajax({  
12 - url: '/goods/netsale/getdata',  
13 - async: false,  
14 - data: {  
15 - param: param  
16 - }  
17 -}, function(res) {  
18 - window.NETSALEDATA = res.data;  
19 -}, true); 7 +
  8 +var ViewModel=window.ViewModel;
  9 +window.NETSALEDATA=ViewModel.data||{};
20 10
21 11
22 window.GOLABDATA = { 12 window.GOLABDATA = {
@@ -63,6 +53,7 @@ window.GOLABDATA = { @@ -63,6 +53,7 @@ window.GOLABDATA = {
63 53
64 54
65 55
  56 +
66 //获取skn 57 //获取skn
67 if (NETSALEDATA && NETSALEDATA.baseProductInfo && NETSALEDATA.baseProductInfo.baseProduct) { 58 if (NETSALEDATA && NETSALEDATA.baseProductInfo && NETSALEDATA.baseProductInfo.baseProduct) {
68 $('#productSkn').val(NETSALEDATA.baseProductInfo.baseProduct.productSkn); 59 $('#productSkn').val(NETSALEDATA.baseProductInfo.baseProduct.productSkn);
@@ -90,26 +81,8 @@ if ($('.contentpanel').data('type') == 'info') { @@ -90,26 +81,8 @@ if ($('.contentpanel').data('type') == 'info') {
90 $("#search-key-list").hide(); 81 $("#search-key-list").hide();
91 $(".brand-list").hide(); 82 $(".brand-list").hide();
92 83
93 - // 上架审核的查看页面  
94 - if ($('.contentpanel').data('action') != 'audit') {  
95 -  
96 - $('#passBtn').hide();  
97 - $('#rejectBtn').hide();  
98 - } else {  
99 - var status = NETSALEDATA.baseProductInfo.baseProduct.status;  
100 - //待审核状态 或者 再上架待审核  
101 - if (status != 2 && status != 5) {  
102 - $('#passBtn').hide();  
103 - $('#rejectBtn').hide();  
104 - }  
105 - }  
106 -  
107 -} else {  
108 - $('#backBtn').hide();  
109 - $('#passBtn').hide();  
110 - $('#rejectBtn').hide();  
111 -}  
112 84
  85 +}
113 86
114 //保存完整网销信息 87 //保存完整网销信息
115 var e = new common.edit('#netsaleAllInfo'); 88 var e = new common.edit('#netsaleAllInfo');
@@ -148,59 +121,6 @@ $(document).on("click", "#saveAllInfo", function() { @@ -148,59 +121,6 @@ $(document).on("click", "#saveAllInfo", function() {
148 121
149 }); 122 });
150 123
151 -  
152 -var Bll = {  
153 - toast: function(content, fn) {  
154 - common.dialog.confirm("温馨提示", content, function() {  
155 - common.util.__ajax({  
156 - url: '/supplier/baseproduct/auditReject',  
157 - data: fn()  
158 - }, function() {  
159 - //g.reload();  
160 - //loadTab();  
161 - history.go(-1);  
162 - });  
163 - });  
164 - }  
165 -}  
166 -  
167 -  
168 -// 单个驳回  
169 -$(document).on("click", "#rejectBtn", function() {  
170 - //auditOperation([],3,)  
171 -  
172 - var data = function() {  
173 -  
174 - var reason = $('#reason').val();  
175 - if (reason === '' || $.trim(reason) === '') {  
176 - return "请填写驳回原因";  
177 - }  
178 -  
179 - return {  
180 - productSknList: JSON.stringify([NETSALEDATA.baseProductInfo.baseProduct.productSkn]),  
181 - targetStatus: 3, // 驳回  
182 - rejectReason: reason  
183 - };  
184 - }  
185 - Bll.toast($("#template").html(), data);  
186 -});  
187 -  
188 -  
189 -// 单个通过  
190 -$(document).on("click", "#passBtn", function() {  
191 - //auditOperation([],3,)  
192 -  
193 - var data = function() {  
194 -  
195 - return {  
196 - productSknList: JSON.stringify([NETSALEDATA.baseProductInfo.baseProduct.productSkn]),  
197 - targetStatus: 4, //通过  
198 - rejectReason: ""  
199 - };  
200 - }  
201 - Bll.toast("确定要通过该申请吗?", data);  
202 -});  
203 -  
204 //类似描点跳转,描点会影响history.go(-1) 124 //类似描点跳转,描点会影响history.go(-1)
205 $('.floatnav').on('click', 'li', function() { 125 $('.floatnav').on('click', 'li', function() {
206 126
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 var $ = require('jquery'), 2 var $ = require('jquery'),
3 common = require('../../common/common'); 3 common = require('../../common/common');
4 4
  5 +
5 var ENUM = { 6 var ENUM = {
6 gender: { 7 gender: {
7 1: '男', 8 1: '男',
@@ -12,7 +13,8 @@ var ENUM = { @@ -12,7 +13,8 @@ var ENUM = {
12 1: '成人', 13 1: '成人',
13 2: '大童', 14 2: '大童',
14 3: '小童', 15 3: '小童',
15 - '2|3':"大童/小童" 16 + '2|3': "大小童",
  17 + '3|2': "大小童"
16 }, 18 },
17 status: { 19 status: {
18 '8': '待上架', 20 '8': '待上架',
@@ -41,6 +43,10 @@ var ENUM = { @@ -41,6 +43,10 @@ var ENUM = {
41 "Y": "是", 43 "Y": "是",
42 "N": "否", 44 "N": "否",
43 "B": "品牌设置" 45 "B": "品牌设置"
  46 + },
  47 + Url:{
  48 + grid:"/product/queryNetSaleInforList",
  49 + tab:"/product/queryTabProductNum"
44 } 50 }
45 }; 51 };
46 52
@@ -75,7 +81,7 @@ var t = new common.tab2({ @@ -75,7 +81,7 @@ var t = new common.tab2({
75 } else { 81 } else {
76 sortFlag = 1; 82 sortFlag = 1;
77 } 83 }
78 - g.init("/product/queryNetSaleInforList"); 84 + g.init(ENUM.Url.grid);
79 }, 85 },
80 columns: [{ 86 columns: [{
81 name: "0", 87 name: "0",
@@ -123,10 +129,10 @@ var g = new common.grid({ @@ -123,10 +129,10 @@ var g = new common.grid({
123 isOutLets: common.util.__input("isOutLets"), 129 isOutLets: common.util.__input("isOutLets"),
124 productStatus: common.util.__input("productStatus"), 130 productStatus: common.util.__input("productStatus"),
125 size: common.util.__input("size"), 131 size: common.util.__input("size"),
126 - productStatusStr: t.value, 132 + productStatusStr: t.options.columns[t.options.active].value,
127 tab: $('#basicTab').find('.active').index(), 133 tab: $('#basicTab').find('.active').index(),
128 - isInfoMiss: t.isInfoMiss,  
129 - sortFlag: t.sortFlag, 134 + isInfoMiss: isInfoMiss,
  135 + sortFlag: sortFlag,
130 skcOnsaleStatus:common.util.__input("skcOnsaleStatus"), 136 skcOnsaleStatus:common.util.__input("skcOnsaleStatus"),
131 isAdvance:common.util.__input("isAdvance") 137 isAdvance:common.util.__input("isAdvance")
132 }; 138 };
@@ -285,7 +291,7 @@ var g = new common.grid({ @@ -285,7 +291,7 @@ var g = new common.grid({
285 render: function(item) { 291 render: function(item) {
286 var HtmArr = []; 292 var HtmArr = [];
287 293
288 - if (item.shopId == shopId) { 294 + if (item.shopId == common.util.__input("shopId")) {
289 if (item.status == 4 || item.status == 1 || item.status == 5 || item.status == 6) { 295 if (item.status == 4 || item.status == 1 || item.status == 5 || item.status == 6) {
290 HtmArr.push('<a href="/goods/netsale/edit/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs edit-btn">编辑</a>'); 296 HtmArr.push('<a href="/goods/netsale/edit/' + item.productSkn + editPostion + '" class="btn btn-info btn-xs edit-btn">编辑</a>');
291 HtmArr.push('<a href="javascript:;" class="btn btn-danger btn-xs shelve-btn" data-index="' + item.__index + '">下架</a>'); 297 HtmArr.push('<a href="javascript:;" class="btn btn-danger btn-xs shelve-btn" data-index="' + item.__index + '">下架</a>');
@@ -300,8 +306,8 @@ var g = new common.grid({ @@ -300,8 +306,8 @@ var g = new common.grid({
300 } 306 }
301 }] 307 }]
302 }); 308 });
  309 +g.init(ENUM.Url.grid);
303 310
304 -g.init("/product/queryNetSaleInforList");  
305 311
306 312
307 //tab 313 //tab
@@ -309,7 +315,7 @@ var loadtab = function() { @@ -309,7 +315,7 @@ var loadtab = function() {
309 t.active = undefined; 315 t.active = undefined;
310 setTimeout(function() { 316 setTimeout(function() {
311 common.util.__ajax({ 317 common.util.__ajax({
312 - url: '/product/queryTabProductNum', 318 + url: ENUM.Url.tab,
313 data: g.options.parms() 319 data: g.options.parms()
314 }, function(res) { 320 }, function(res) {
315 var __dt = $.extend({}, ENUM.tab, res.data); 321 var __dt = $.extend({}, ENUM.tab, res.data);
@@ -322,8 +328,6 @@ loadtab(); @@ -322,8 +328,6 @@ loadtab();
322 328
323 329
324 330
325 -g.init($("#gridurl").val());  
326 -  
327 //筛选 331 //筛选
328 $("#filter-btn").click(function() { 332 $("#filter-btn").click(function() {
329 loadtab(); 333 loadtab();
@@ -354,11 +358,16 @@ function shelveModal(title, html) { @@ -354,11 +358,16 @@ function shelveModal(title, html) {
354 content: html 358 content: html
355 }); 359 });
356 360
357 -  
358 - if (len === 1 && g.selected[0].isAdvance === 'N') {  
359 - $('#advanceBeginTime, #advanceEndTime').prop('disabled', true);  
360 - $('#advanceBeginTime').parents('.form-group').find('.btn').addClass('disabled');  
361 - } 361 +
  362 + g.selected.forEach(function(item){
  363 + if(item.isAdvance === 'N'){
  364 + $('#advanceBeginTime, #advanceEndTime').prop('disabled', true);
  365 + $('#advanceBeginTime').parents('.form-group').find('.btn').addClass('disabled');
  366 + }else{
  367 + $('#shelveTime').prop('disabled', true);
  368 + $('#shelveTime').parents('.form-group').next(".form-group").find('.btn').addClass('disabled');
  369 + }
  370 + });
362 var e = new common.edit('.shelve-form'); 371 var e = new common.edit('.shelve-form');
363 e.init(); 372 e.init();
364 373
@@ -366,39 +375,41 @@ function shelveModal(title, html) { @@ -366,39 +375,41 @@ function shelveModal(title, html) {
366 var type = $(this).data('type'); 375 var type = $(this).data('type');
367 $(this).closest('.form-group').find('input').attr('required', true) 376 $(this).closest('.form-group').find('input').attr('required', true)
368 .end().siblings('.form-group').find('input').attr('required', false); 377 .end().siblings('.form-group').find('input').attr('required', false);
369 - var data={}; 378 + var data={},isValidate=false;
370 data.productSknList = JSON.stringify(productSknList); 379 data.productSknList = JSON.stringify(productSknList);
371 - if($("#shelveTime").val()){  
372 - if(type=="1"){  
373 - data.shelveTime=$("#shelveTime").val();  
374 - data.type=3;  
375 - }else{  
376 - data.onNewTime=$("#shelveTime").val();  
377 - data.type=4; 380 + if(type=="5"){
  381 + data.advanceBeginTime=$("#advanceBeginTime").val();
  382 + data.advanceEndTime=$("#advanceEndTime").val();
  383 + if(!(data.advanceEndTime&&data.advanceEndTime)){
  384 + isValidate=true;
  385 + e.$tip("请填写预售时间");
  386 + return;
378 } 387 }
379 - 388 + data.type=5;
380 }else{ 389 }else{
381 - data.type=type;  
382 - }  
383 - common.util.__ajax({  
384 - url:'/product/updateProductSknTimingInfo',  
385 - data:data  
386 - },function(res){  
387 - if (res.code == 200) {  
388 - e.$tip(res.message, function() {  
389 - shelveLayer.close();  
390 - loadtab();  
391 - g.reload();  
392 - }, 'growl-success');  
393 - } else {  
394 - //e.$tip(res.data.message);  
395 - var html = '';  
396 - $.each(res.data, function(key, value) {  
397 - html += key + ':' + value + '<br>';  
398 - });  
399 - e.$tip(html); 390 + if($("#shelveTime").val()){
  391 + if(type=="1"){
  392 + data.shelveTime=$("#shelveTime").val();
  393 + data.type=3;
  394 + }else{
  395 + data.onNewTime=$("#shelveTime").val();
  396 + data.type=4;
  397 + }
  398 +
  399 + }else{
  400 + data.type=type;
400 } 401 }
401 - }); 402 + }
  403 + if(!isValidate){
  404 + common.util.__ajax({
  405 + url:'/product/updateProductSknTimingInfo',
  406 + data:data
  407 + },function(res){
  408 + shelveLayer.close();
  409 + loadtab();
  410 + g.reload();
  411 + });
  412 + }
402 }); 413 });
403 } 414 }
404 //批量skn上架 415 //批量skn上架
@@ -440,11 +451,19 @@ $('#export-btn').on('click', function() { @@ -440,11 +451,19 @@ $('#export-btn').on('click', function() {
440 window.open("/ajax/down?queryConf=" + JSON.stringify(data) + "&type=netSale"); 451 window.open("/ajax/down?queryConf=" + JSON.stringify(data) + "&type=netSale");
441 }); 452 });
442 453
  454 +
443 //sku skc上架表格 455 //sku skc上架表格
444 var shelveTable = new common.grid({ 456 var shelveTable = new common.grid({
445 el: "#shelve-table", 457 el: "#shelve-table",
446 secondIndex: 2, 458 secondIndex: 2,
447 columns: [{ 459 columns: [{
  460 + display: '默认封面图',
  461 + render: function(item) {
  462 + if(item.initGoodsImageUrl){
  463 + return '<img src="'+item.initGoodsImageUrl+'" width=120 height=80>';
  464 + }
  465 + }
  466 + },{
448 display: 'SKC(商品信息)', 467 display: 'SKC(商品信息)',
449 render: function(item) { 468 render: function(item) {
450 469
@@ -483,7 +502,7 @@ $('#basicTable').on('click', '.shelve-btn', function() { @@ -483,7 +502,7 @@ $('#basicTable').on('click', '.shelve-btn', function() {
483 getdata(item.productSkn, function(res) { 502 getdata(item.productSkn, function(res) {
484 shelveLayer = common.dialog.open({ 503 shelveLayer = common.dialog.open({
485 title: '上/下架', 504 title: '上/下架',
486 - width: 900, 505 + width: '80%',
487 content: common.util.__template($('#template').html(), res.data.baseProductInfo.baseProduct) 506 content: common.util.__template($('#template').html(), res.data.baseProductInfo.baseProduct)
488 }); 507 });
489 508
@@ -496,7 +515,7 @@ $('#basicTable').on('click', '.shelve-btn', function() { @@ -496,7 +515,7 @@ $('#basicTable').on('click', '.shelve-btn', function() {
496 515
497 function getdata(Skn, callback) { 516 function getdata(Skn, callback) {
498 common.util.__ajax({ 517 common.util.__ajax({
499 - url: '/goods/netsale/getdata', 518 + url: '/product/getNetSaleInfo',
500 data: { 519 data: {
501 param: Skn 520 param: Skn
502 } 521 }
@@ -522,11 +541,12 @@ $(document).on("click", ".btnskc", function() { @@ -522,11 +541,12 @@ $(document).on("click", ".btnskc", function() {
522 goodsList = res.data.goodsList; 541 goodsList = res.data.goodsList;
523 shelveTable.init(res.data.goodsList); 542 shelveTable.init(res.data.goodsList);
524 }); 543 });
525 - g.init($("#gridurl").val()); 544 + g.init(ENUM.Url.grid);
526 } 545 }
527 }) 546 })
528 }); 547 });
529 548
  549 +
530 $(document).on("click", ".btnsku", function() { 550 $(document).on("click", ".btnsku", function() {
531 var item = goodsList[$(this).data("index")] 551 var item = goodsList[$(this).data("index")]
532 var item1 = item.goodsSizeList[$(this).data("subindex")]; 552 var item1 = item.goodsSizeList[$(this).data("subindex")];
1 var $ = require('jquery'), 1 var $ = require('jquery'),
2 - common = require('../../common/common'); 2 + common = require('../../../common/common');
3 3
4 4
5 var e = new common.edit('#addinfo-wrap'), 5 var e = new common.edit('#addinfo-wrap'),
@@ -14,7 +14,6 @@ $('#saveAddInfo').on('click', function() { @@ -14,7 +14,6 @@ $('#saveAddInfo').on('click', function() {
14 e.submit('/product/saveAfterSaleInfo', function(option) { 14 e.submit('/product/saveAfterSaleInfo', function(option) {
15 option.data = GOLABDATA.fire('LYaddInfo'); 15 option.data = GOLABDATA.fire('LYaddInfo');
16 option.success = function(res) { 16 option.success = function(res) {
17 - res = res.data;  
18 if (res.code == '200') { 17 if (res.code == '200') {
19 e.$tip(res.message, function() {}, 'growl-success'); 18 e.$tip(res.message, function() {}, 'growl-success');
20 } else { 19 } else {
@@ -90,7 +89,7 @@ $.ajax({ @@ -90,7 +89,7 @@ $.ajax({
90 }, 89 },
91 dataType: 'json', 90 dataType: 'json',
92 success: function(res) { 91 success: function(res) {
93 - var data = res.data; 92 + var data = res;
94 data.style = basicInfo.style; 93 data.style = basicInfo.style;
95 data.pattern = basicInfo.pattern; 94 data.pattern = basicInfo.pattern;
96 data.brandModel = productExtBo.brandModel; 95 data.brandModel = productExtBo.brandModel;
@@ -222,7 +221,7 @@ var ag = new common.grid({ @@ -222,7 +221,7 @@ var ag = new common.grid({
222 ag.__edit = new common.edit("#attributeTable"); 221 ag.__edit = new common.edit("#attributeTable");
223 222
224 common.util.__ajax({ 223 common.util.__ajax({
225 - url: '/base/goods/queryAllProductAttr', 224 + url: '/standard/queryAllBySortId4Html',
226 data: { 225 data: {
227 param: basicInfo.smallSortId, 226 param: basicInfo.smallSortId,
228 displayPosition: 1 227 displayPosition: 1
@@ -308,7 +307,7 @@ var ag3 = new common.grid({ @@ -308,7 +307,7 @@ var ag3 = new common.grid({
308 }); 307 });
309 ag3.__edit = new common.edit("#goodsParamWrap2"); 308 ag3.__edit = new common.edit("#goodsParamWrap2");
310 common.util.__ajax({ 309 common.util.__ajax({
311 - url: '/base/goods/queryMaterialList', 310 + url: '/product/queryMaterialList',
312 data: { 311 data: {
313 categoryId: basicInfo.maxSortId 312 categoryId: basicInfo.maxSortId
314 } 313 }
1 var $ = require('jquery'), 1 var $ = require('jquery'),
2 - common = require('../../common/common'); 2 + common = require('../../../common/common');
3 3
4 var basicInfohtml = '', 4 var basicInfohtml = '',
5 ENUM = { 5 ENUM = {
@@ -12,7 +12,9 @@ var basicInfohtml = '', @@ -12,7 +12,9 @@ var basicInfohtml = '',
12 ageLevel: { 12 ageLevel: {
13 '1': '成人', 13 '1': '成人',
14 '2': '大童', 14 '2': '大童',
15 - '3': '小童' 15 + '3': '小童',
  16 + '2|3': "大小童",
  17 + '3|2': "大小童"
16 }, 18 },
17 gender: { 19 gender: {
18 1: '男', 20 1: '男',
@@ -88,8 +90,8 @@ function convert(basicInfo, obj) { @@ -88,8 +90,8 @@ function convert(basicInfo, obj) {
88 90
89 91
90 var basicInfoData = convert(basicInfo, convertObj); 92 var basicInfoData = convert(basicInfo, convertObj);
91 -basicInfoData.expectArrivalTime = common.util.__dateFormat(new Date(basicInfoData.expectArrivalTime * 1000), "yyyy-MM-dd hh:mm:ss");  
92 -basicInfoData.expectShelfTime = common.util.__dateFormat(new Date(basicInfoData.expectShelfTime * 1000), "yyyy-MM-dd hh:mm:ss"); 93 +basicInfoData.expectArrivalTime =basicInfoData.expectArrivalTime? common.util.__dateFormat(new Date(basicInfoData.expectArrivalTime * 1000), "yyyy-MM-dd hh:mm:ss"):"";
  94 +basicInfoData.expectShelfTime =basicInfoData.expectShelfTime? common.util.__dateFormat(new Date(basicInfoData.expectShelfTime * 1000), "yyyy-MM-dd hh:mm:ss"):"";
93 95
94 //基本信息 96 //基本信息
95 basicInfoData.renderType = $('.contentpanel').data('type'); 97 basicInfoData.renderType = $('.contentpanel').data('type');
@@ -126,7 +128,7 @@ productExtBo.sellChannels = productExtBo.sellChannels ? productExtBo.sellChannel @@ -126,7 +128,7 @@ productExtBo.sellChannels = productExtBo.sellChannels ? productExtBo.sellChannel
126 128
127 //productExtBo.shopList = 129 //productExtBo.shopList =
128 common.util.__ajax({ 130 common.util.__ajax({
129 - url: '/goods/ShopsRest/queryShopsByBrandId', 131 + url: '/ShopsRest/queryShopsByBrandId',
130 data: { 132 data: {
131 brandId: basicInfo.brandId 133 brandId: basicInfo.brandId
132 } 134 }
@@ -162,7 +164,6 @@ $('#saveBasicInfo').on('click', function() { @@ -162,7 +164,6 @@ $('#saveBasicInfo').on('click', function() {
162 e.submit('/product/saveNetSaleBaseInfo', function(option) { 164 e.submit('/product/saveNetSaleBaseInfo', function(option) {
163 option.data = GOLABDATA.fire("LYbasicInfo");; 165 option.data = GOLABDATA.fire("LYbasicInfo");;
164 option.success = function(res) { 166 option.success = function(res) {
165 - res = res.data;  
166 if (res.code == '200') { 167 if (res.code == '200') {
167 e.$tip(res.message, function() {}, 'growl-success'); 168 e.$tip(res.message, function() {}, 'growl-success');
168 } else { 169 } else {
1 'use strict'; 1 'use strict';
2 var $ = require('jquery'), 2 var $ = require('jquery'),
3 - common = require('../../common/common'); 3 + common = require('../../../common/common');
4 4
5 -require('../../common/umeditor.config');  
6 -require('../../common/umeditor');  
7 -require('../../common/zh-cn'); 5 +require('../../../common/umeditor.config');
  6 +require('../../../common/umeditor');
  7 +require('../../../common/zh-cn');
8 var productSkn, BUCKET = { 8 var productSkn, BUCKET = {
9 bucket: "goodsimg" 9 bucket: "goodsimg"
10 }; 10 };
@@ -40,7 +40,6 @@ $(document).on("click", "#btn-descriptioner", function () { @@ -40,7 +40,6 @@ $(document).on("click", "#btn-descriptioner", function () {
40 descriptionEdit.submit('/product/saveProductDesc', function (option) { 40 descriptionEdit.submit('/product/saveProductDesc', function (option) {
41 option.data = GOLABDATA.fire('LYproductDesc'); 41 option.data = GOLABDATA.fire('LYproductDesc');
42 option.success = function (res) { 42 option.success = function (res) {
43 - res = res.data;  
44 if (res.code == '200') { 43 if (res.code == '200') {
45 descriptionEdit.$tip(res.message, function () { 44 descriptionEdit.$tip(res.message, function () {
46 }, 'growl-success'); 45 }, 'growl-success');
@@ -67,6 +66,8 @@ common.util.__ajax({ @@ -67,6 +66,8 @@ common.util.__ajax({
67 recommender = res.data; 66 recommender = res.data;
68 } 67 }
69 },true); 68 },true);
  69 +
  70 +
70 /** 71 /**
71 * 点击小编推荐 72 * 点击小编推荐
72 */ 73 */
@@ -103,7 +104,6 @@ $(document).on("click", "#btn-recommand", function () { @@ -103,7 +104,6 @@ $(document).on("click", "#btn-recommand", function () {
103 recommendEdit.submit('/product/saveNetSaleRecommend', function (option) { 104 recommendEdit.submit('/product/saveNetSaleRecommend', function (option) {
104 option.data = GOLABDATA.fire('LYrecommend'); 105 option.data = GOLABDATA.fire('LYrecommend');
105 option.success = function (res) { 106 option.success = function (res) {
106 - res = res.data;  
107 if (res.code == '200') { 107 if (res.code == '200') {
108 recommendEdit.$tip(res.message, function () { 108 recommendEdit.$tip(res.message, function () {
109 }, 'growl-success'); 109 }, 'growl-success');
@@ -172,76 +172,75 @@ var g = new common.grid({ @@ -172,76 +172,75 @@ var g = new common.grid({
172 g.init('/collocation/selectCollocationListBySkn'); 172 g.init('/collocation/selectCollocationListBySkn');
173 173
174 var Bll = { 174 var Bll = {
175 - posData: [],  
176 - toast: function(title, item, url) {  
177 - var e = new common.edit("#dapei-form", BUCKET);  
178 - if(item.info){  
179 - item.info.forEach(function(d){  
180 - Bll.posData.push(d);  
181 - });  
182 - }  
183 -  
184 - var d = new common.dialog({  
185 - title: title,  
186 - width: '70%',  
187 - content: common.util.__template2($("#wqt-template1").html(), item),  
188 - button: [{  
189 - value: "提交",  
190 - callback: function() {  
191 -  
192 - e.submit(url, function(option) {  
193 - option.data.id = item.id;  
194 - option.data.productSkn = productSkn;  
195 - option.data.infoStr = JSON.stringify(Bll.posData);  
196 - console.log(option.data);  
197 - option.success = function(res) {  
198 - res = res.data;  
199 - if (res.code == +"200") {  
200 - e.$tip("提交成功", function() {  
201 - d.close();  
202 - g.reload();  
203 - }, 'growl-success');  
204 - } else {  
205 - e.$tip(res.message);  
206 - }  
207 - }  
208 - });  
209 - return false;  
210 - },  
211 - css: "btn-primary"  
212 - }, {  
213 - value: "取消"  
214 - }]  
215 - });  
216 -  
217 - e.init();  
218 - e.on("callback", function(obj) {  
219 - if (obj.key == "file_onComplete_imageUrl") {  
220 - // $("#editimg").attr("src",obj.data);  
221 - $(".poseditimg").html("<img src='" + obj.data + "'/>");  
222 - }  
223 - });  
224 - } 175 + posData: [],
  176 + toast: function(title, item, url) {
  177 + var e = new common.edit("#dapei-form", BUCKET);
  178 + if(item.info){
  179 + item.info.forEach(function(d){
  180 + Bll.posData.push(d);
  181 + });
  182 + }
  183 +
  184 + var d = new common.dialog({
  185 + title: title,
  186 + width: '70%',
  187 + content: common.util.__template2($("#wqt-template1").html(), item),
  188 + button: [{
  189 + value: "提交",
  190 + callback: function() {
  191 +
  192 + e.submit(url, function(option) {
  193 + option.data.id = item.id;
  194 + option.data.productSkn = productSkn;
  195 + option.data.infoStr = JSON.stringify(Bll.posData);
  196 + console.log(option.data);
  197 + option.success = function(res) {
  198 + if (res.code == +"200") {
  199 + e.$tip("提交成功", function() {
  200 + d.close();
  201 + g.reload();
  202 + }, 'growl-success');
  203 + } else {
  204 + e.$tip(res.message);
  205 + }
  206 + }
  207 + });
  208 + return false;
  209 + },
  210 + css: "btn-primary"
  211 + }, {
  212 + value: "取消"
  213 + }]
  214 + });
  215 +
  216 + e.init();
  217 + e.on("callback", function(obj) {
  218 + if (obj.key == "file_onComplete_imageUrl") {
  219 + // $("#editimg").attr("src",obj.data);
  220 + $(".poseditimg").html("<img src='" + obj.data + "'/>");
  221 + }
  222 + });
  223 + }
225 } 224 }
226 - /*编辑*/ 225 +/*编辑*/
227 226
228 $(document).on("dblclick", ".poseditimg img", function(e) { 227 $(document).on("dblclick", ".poseditimg img", function(e) {
229 - var pos = {  
230 - top: e.pageY - $(this).offset().top,  
231 - left: e.pageX - $(this).offset().left,  
232 - width: 150,  
233 - height: 150  
234 - }  
235 - Bll.posData.push(pos);  
236 - var _pos = $(common.util.__template2($("#kapian").html(), {  
237 - __index: Bll.posData.length - 1  
238 - }));  
239 - _pos.css({  
240 - top: pos.top + "px",  
241 - left: pos.left + "px"  
242 - });  
243 -  
244 - $(".poseditimg").append(_pos); 228 + var pos = {
  229 + top: e.pageY - $(this).offset().top,
  230 + left: e.pageX - $(this).offset().left,
  231 + width: 150,
  232 + height: 150
  233 + }
  234 + Bll.posData.push(pos);
  235 + var _pos = $(common.util.__template2($("#kapian").html(), {
  236 + __index: Bll.posData.length - 1
  237 + }));
  238 + _pos.css({
  239 + top: pos.top + "px",
  240 + left: pos.left + "px"
  241 + });
  242 +
  243 + $(".poseditimg").append(_pos);
245 }); 244 });
246 $(document).on("click", ".poseditimg .close", function (e) { 245 $(document).on("click", ".poseditimg .close", function (e) {
247 var index = $(this).data("index"); 246 var index = $(this).data("index");
@@ -295,6 +294,7 @@ $(document).on("click", "#dapeiTable .edit", function () { @@ -295,6 +294,7 @@ $(document).on("click", "#dapeiTable .edit", function () {
295 }); 294 });
296 295
297 296
  297 +
298 /*封面设置*/ 298 /*封面设置*/
299 var goodsList = {}; 299 var goodsList = {};
300 if (window.NETSALEDATA && window.NETSALEDATA.goodsList) { 300 if (window.NETSALEDATA && window.NETSALEDATA.goodsList) {
@@ -374,37 +374,37 @@ function addFengmian(index, src) { @@ -374,37 +374,37 @@ function addFengmian(index, src) {
374 //封面调用图片 374 //封面调用图片
375 var uesImgDialog = null; 375 var uesImgDialog = null;
376 $(document).on('click', '.btn-use-img', function() { 376 $(document).on('click', '.btn-use-img', function() {
377 - var productSkc = $(this).data('productSkc'),  
378 - index = $(this).data("index");  
379 -  
380 - common.util.__ajax({  
381 - url: '/goods/productPhoto/queryProductPhotoList',  
382 - data: {  
383 - productSkn: $('#productSkn').val(),  
384 - productSkc: productSkc  
385 - }  
386 - }, function(res) {  
387 - var data = res.data;  
388 - var imgHtml = '';  
389 - if (res.code == 200 && data.list instanceof Array && data.list[0].pictureBoList instanceof Array) {  
390 - $.each(data.list[0].pictureBoList, function(i, value) {  
391 - imgHtml += '<img class="use-img" src="' + value.fileName + '" alt="" width="100" height="140" data-index="' + index + '" style="cursor:pointer;margin: 0 0 10px 10px;" />';  
392 - });  
393 - uesImgDialog = common.dialog.open({  
394 - title: '调用图片',  
395 - content: imgHtml  
396 - });  
397 - } else {  
398 - common.util.__tip('没有可调用的图片', 'warning');  
399 - }  
400 - }, true); 377 + var productSkc = $(this).data('productSkc'),
  378 + index = $(this).data("index");
  379 +
  380 + common.util.__ajax({
  381 + url: '/productPhoto/queryProductPhotoList',
  382 + data: {
  383 + productSkn: $('#productSkn').val(),
  384 + productSkc: productSkc
  385 + }
  386 + }, function(res) {
  387 + var data = res.data;
  388 + var imgHtml = '';
  389 + if (res.code == 200 && data.list instanceof Array && data.list[0].pictureBoList instanceof Array) {
  390 + $.each(data.list[0].pictureBoList, function(i, value) {
  391 + imgHtml += '<img class="use-img" src="' + value.fileName + '" alt="" width="100" height="140" data-index="' + index + '" style="cursor:pointer;margin: 0 0 10px 10px;" />';
  392 + });
  393 + uesImgDialog = common.dialog.open({
  394 + title: '调用图片',
  395 + content: imgHtml
  396 + });
  397 + } else {
  398 + common.util.__tip('没有可调用的图片', 'warning');
  399 + }
  400 + }, true);
401 }); 401 });
402 402
403 //点击调用的图片添加封面图 403 //点击调用的图片添加封面图
404 $(document).on('click', '.use-img', function() { 404 $(document).on('click', '.use-img', function() {
405 - addFengmian($(this).data("index"), $(this).attr("src"));  
406 - renderGoodList();  
407 - uesImgDialog.close(); 405 + addFengmian($(this).data("index"), $(this).attr("src"));
  406 + renderGoodList();
  407 + uesImgDialog.close();
408 }); 408 });
409 409
410 //设置颜色封面 410 //设置颜色封面
@@ -413,11 +413,12 @@ $('#fenmianWrap').on("click", ".btn-metro", function () { @@ -413,11 +413,12 @@ $('#fenmianWrap').on("click", ".btn-metro", function () {
413 var index1 = $(this).parents(".cover-image-item").index(); 413 var index1 = $(this).parents(".cover-image-item").index();
414 var list = goodsList[index].goodsImagesList; 414 var list = goodsList[index].goodsImagesList;
415 var item = goodsList[index].goodsImagesList[index1]; 415 var item = goodsList[index].goodsImagesList[index1];
416 - var colorIndex = $(this).index(); 416 + var colorIndex = $(this).data("i");
417 if (colorIndex == 0) { 417 if (colorIndex == 0) {
418 list.forEach(function (item, index) { 418 list.forEach(function (item, index) {
419 if (index == index1) { 419 if (index == index1) {
420 item.isDefault = "Y"; 420 item.isDefault = "Y";
  421 + item.genderCover = 0;
421 } else { 422 } else {
422 item.isDefault = "N"; 423 item.isDefault = "N";
423 } 424 }
@@ -426,6 +427,7 @@ $('#fenmianWrap').on("click", ".btn-metro", function () { @@ -426,6 +427,7 @@ $('#fenmianWrap').on("click", ".btn-metro", function () {
426 list.forEach(function (item, index) { 427 list.forEach(function (item, index) {
427 if (index == index1) { 428 if (index == index1) {
428 item.genderCover = colorIndex; 429 item.genderCover = colorIndex;
  430 + item.isDefault = "N";
429 } else { 431 } else {
430 item.genderCover = 0; 432 item.genderCover = 0;
431 } 433 }
1 'use strict'; 1 'use strict';
2 var $ = require('jquery'), 2 var $ = require('jquery'),
3 - common = require('../../common/common'); 3 + common = require('../../../common/common');
4 4
5 var modelCardTable = new common.grid({ 5 var modelCardTable = new common.grid({
6 el: "#model-card", 6 el: "#model-card",
1 var $ = require('jquery'), 1 var $ = require('jquery'),
2 - common = require('../../common/common'),  
3 - util = require('../../common/util');  
4 - 2 + common = require('../../../common/common');
5 if (window.NETSALEDATA) { 3 if (window.NETSALEDATA) {
6 4
7 { //搜索关键词 5 { //搜索关键词
@@ -29,7 +27,7 @@ if (window.NETSALEDATA) { @@ -29,7 +27,7 @@ if (window.NETSALEDATA) {
29 }] 27 }]
30 }); 28 });
31 29
32 - g.init('/netSale/queryHotSearchTerms'); 30 + g.init('/searchWords/queryHotSearchTerms');
33 31
34 $("#searchKeys").on('change', function () { 32 $("#searchKeys").on('change', function () {
35 searchKeys = $("#searchKeys").val(); 33 searchKeys = $("#searchKeys").val();
@@ -68,12 +66,13 @@ if (window.NETSALEDATA) { @@ -68,12 +66,13 @@ if (window.NETSALEDATA) {
68 66
69 } 67 }
70 68
71 - { //尺寸信息 69 + {
  70 + //尺寸信息
72 var productSkn = window.NETSALEDATA.baseProductInfo.baseProduct.productSkn; 71 var productSkn = window.NETSALEDATA.baseProductInfo.baseProduct.productSkn;
73 var dataList; 72 var dataList;
74 if (productSkn) { 73 if (productSkn) {
75 common.util.__ajax({ 74 common.util.__ajax({
76 - url: '/meterManage/productSize/queryProdSizeList', 75 + url: '/productSize/queryProdSizeList',
77 data: { 76 data: {
78 productSkn: productSkn 77 productSkn: productSkn
79 } 78 }
@@ -95,7 +94,9 @@ if (window.NETSALEDATA) { @@ -95,7 +94,9 @@ if (window.NETSALEDATA) {
95 var refName = item1.referenceName ? item1.referenceName : "";//非空判断 94 var refName = item1.referenceName ? item1.referenceName : "";//非空判断
96 var a = refName.split(/[|/]/g); 95 var a = refName.split(/[|/]/g);
97 var refName1 = a[0] || "", refName2 = a[1] || ""; 96 var refName1 = a[0] || "", refName2 = a[1] || "";
98 - return '<div class="form-group"><div class="col-sm-3"><input class=" form-control" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/></div>' + '<div class="col-sm-1">' + '/</div>' + '<div class="col-sm-3"><input class=" form-control" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/></div></div>'; 97 + //console.log("refName1",refName1);
  98 + //console.log("refName2",refName2);
  99 + return '<div class="form-group"><div class="col-sm-5"><input class=" form-control refInfo refInfo1" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/></div>' + '<div class="col-sm-1">' + '/</div>' + '<div class="col-sm-5"><input class=" form-control refInfo refInfo2" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/></div></div>';
99 } 100 }
100 }); 101 });
101 for (var i = 0; i < dataList.sizeRelationsList[0].prdSizeAttributeBoList.length; i++) {//尺码列 102 for (var i = 0; i < dataList.sizeRelationsList[0].prdSizeAttributeBoList.length; i++) {//尺码列
@@ -148,14 +149,16 @@ if (window.NETSALEDATA) { @@ -148,14 +149,16 @@ if (window.NETSALEDATA) {
148 referenceName: ref1.val() + '/' + ref2.val() 149 referenceName: ref1.val() + '/' + ref2.val()
149 }); 150 });
150 } 151 }
  152 + //console.log(productSizeReferList);
151 var data = { 153 var data = {
152 productSkn: dataList.productSkn, 154 productSkn: dataList.productSkn,
153 noMeasureIds: noMeasureIds, 155 noMeasureIds: noMeasureIds,
154 sizeInfoList: JSON.stringify(sizeInfoList), 156 sizeInfoList: JSON.stringify(sizeInfoList),
155 productSizeReferList: JSON.stringify(productSizeReferList) 157 productSizeReferList: JSON.stringify(productSizeReferList)
156 }; 158 };
  159 +
157 common.util.__ajax({ 160 common.util.__ajax({
158 - url: "/meterManage/productSize/saveProdSizeInfo", 161 + url: "/productSize/saveProdSizeInfo",
159 data: data 162 data: data
160 }, function () { 163 }, function () {
161 }); 164 });
@@ -203,7 +206,7 @@ if (window.NETSALEDATA) { @@ -203,7 +206,7 @@ if (window.NETSALEDATA) {
203 206
204 $('#sort-save').on('click', function () { 207 $('#sort-save').on('click', function () {
205 common.util.__ajax({ 208 common.util.__ajax({
206 - url: '/netSale/saveSearchSort', 209 + url: '/product/saveSearchSort',
207 data: { 210 data: {
208 searchSortList: JSON.stringify(searchSortList) 211 searchSortList: JSON.stringify(searchSortList)
209 } 212 }