netsale-edit.js 1.22 KB
'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');
}