Authored by weiqingting

网销

@@ -8,6 +8,10 @@ tabTree.init(); @@ -8,6 +8,10 @@ tabTree.init();
8 8
9 var ENUM={ 9 var ENUM={
10 /* 10 /*
  11 + *colorId 颜色(主色调)
  12 + *goodsColorImage 商品名称
  13 + */
  14 + /*
11 *marketPrice 市场价 15 *marketPrice 市场价
12 *salePrice 销售价 16 *salePrice 销售价
13 *factoryCode 厂家编号 17 *factoryCode 厂家编号
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 -  
5 require('../util/custom.js'); 4 require('../util/custom.js');
  5 +/*
  6 +* 获取业务数据
  7 +*/
  8 +window.NETSALEDATA=require('./partials/data.js');
  9 +
  10 +console.log(window.NETSALEDATA);
  11 +
  12 +/*加载其他模块*/
  13 +require('./partials/xiaobian');
  14 +
  15 +
  16 +
6 17
7 -var e = new common.edit('#basicForm');  
8 -e.init(); 18 +// var e = new common.edit('#basicForm');
  19 +// e.init();
9 20
10 -common.edit.ajaxfileupload('.goods-img', {  
11 - action: '/ajax/upload',  
12 - onComplete: function() { 21 +// common.edit.ajaxfileupload('.goods-img', {
  22 +// action: '/ajax/upload',
  23 +// onComplete: function() {
13 24
14 - }  
15 -})  
  25 +// }
  26 +// })
  1 +'use strict';
  2 +var $ = require('jquery'),
  3 + common = require('../../common/common');
  4 +
  5 +var ENUM=null;
  6 +var param=location.href.match(/edit\/(\d+)/)[1];
  7 +common.util.__ajax({
  8 + url:'/goods/netsale/getdata',
  9 + async:false,
  10 + data:{
  11 + param:param
  12 + }
  13 +},function(res){
  14 + ENUM=res.data;
  15 +},true);
  16 +
  17 +module.exports=ENUM;
  1 +console.log("小编SB ");
@@ -29,7 +29,6 @@ var entry={index:[],libs:[]}; @@ -29,7 +29,6 @@ var entry={index:[],libs:[]};
29 entry.libs=commons; 29 entry.libs=commons;
30 30
31 31
32 -  
33 var readfile=function(dir,callback){ 32 var readfile=function(dir,callback){
34 var files = fs.readdirSync(dir); 33 var files = fs.readdirSync(dir);
35 files.forEach(function (file) { 34 files.forEach(function (file) {
@@ -37,7 +36,7 @@ var readfile=function(dir,callback){ @@ -37,7 +36,7 @@ var readfile=function(dir,callback){
37 if (fs.statSync(filePath).isFile() && /.*\.js$/i.test(file)) { 36 if (fs.statSync(filePath).isFile() && /.*\.js$/i.test(file)) {
38 callback && callback(filePath); 37 callback && callback(filePath);
39 }else{ 38 }else{
40 - if(file!="common"&&file!="util"){ 39 + if(file!="common"&&file!="util"&&file!="partials"){
41 readfile(filePath,callback); 40 readfile(filePath,callback);
42 } 41 }
43 } 42 }
@@ -166,11 +166,20 @@ exports.res = [ @@ -166,11 +166,20 @@ exports.res = [
166 route: '/goods/netsale/edit/:param', 166 route: '/goods/netsale/edit/:param',
167 method: 'GET', 167 method: 'GET',
168 view: 'pages/goods/netsale-edit', 168 view: 'pages/goods/netsale-edit',
169 - url: '/product/getNetSaleInfo', 169 + // url: '/product/getNetSaleInfo',
170 src: '/goods/netsale-edit', 170 src: '/goods/netsale-edit',
171 data: { 171 data: {
172 action: '' 172 action: ''
173 - }, 173 +
  174 + }//,
  175 + // params: [{
  176 + // name: 'param',
  177 + // type: 'number'
  178 + // }]
  179 + },{
  180 + route: '/goods/netsale/getdata',
  181 + method: 'POST',
  182 + url: '/product/getNetSaleInfo',
174 params: [{ 183 params: [{
175 name: 'param', 184 name: 'param',
176 type: 'number' 185 type: 'number'