netsale-edit.js
1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
'use strict';
var $ = require('jquery'),
common = require('../common/common');
require('../util/custom.js');
/*
<<<<<<< HEAD
* 获取业务数据
*/
window.NETSALEDATA=require('./partials/data.js');
require('./partials/netsale-ty.js');
/*
* 获取业务数据
*/
window.NETSALEDATA = require('./partials/data.js');
// console.log(NETSALEDATA);
window.NETSALEEDIT = new common.edit('#netsaleAllInfo', {
bucket: 'goodsimg'
});
//获取skn
$('#productSkn').val(NETSALEDATA.baseProductInfo.baseProduct.productSkn);
console.log(NETSALEDATA);
/*加载其他模块*/
require('./partials/basic-info');
require('./partials/editor_recommend');
require('./partials/model');
require('./partials/search-key.js');
require('./partials/size-info.js');
require('./partials/goods-sort.js');
require('./partials/video.js');
require('./partials/brand-relation');
require('./partials/add-info');
//初始化网销表单
NETSALEEDIT.init();
// var e = new common.edit('#basicForm');
// e.init();
// common.edit.ajaxfileupload('.goods-img', {
// action: '/ajax/upload',
// onComplete: function() {
// }
// })
if ($('.contentpanel').data('type') == 'info') {
$('form').find('input').prop('disabled', true);
$('form').find('.btn').addClass('disabled');
}