Index.js
2.03 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
'use strict';
var $ = require('jquery'),
common = require('../../../common/common');
require('../../../common/umeditor.config');
require('../../../common/umeditor');
require('../../../common/zh-cn');
var BUCKET = {
bucket: "goodsimg"
};
var editType = $('.contentpanel').data('type');
/*if (window.NETSALEDATA && window.NETSALEDATA.baseProductInfo && window.NETSALEDATA.baseProductInfo.baseProduct.productSkn) {
productSkn = window.NETSALEDATA.baseProductInfo.baseProduct.productSkn;
}*/
/*商品描述*/
window.UMdescriptioner = UM.getEditor('edit-descriptioner');
/*if (window.NETSALEDATA && window.NETSALEDATA.productExtBo.productDesc && window.NETSALEDATA.productExtBo.productDesc) {
UMdescriptioner.setContent(window.NETSALEDATA.productExtBo.productDesc)
};*/
/*保存描述*/
$(document).on("click", "#btn-descriptioner", function () {
common.util.__ajax({
url:'/product/updateBatchProductDesc',
data:{
productSknStrs:common.util.__input('productSkn'),
productDesc:UMdescriptioner.getContent(),
brandId: common.util.__input("brandId"),
maxSortId: tabTree.selected.length > 0 ? tabTree.selected[0].id : "", // 一级类目
middleSortId: tabTree.selected.length > 1 ? tabTree.selected[1].id : "", // 二级类目
smallSortId: tabTree.selected.length > 2 ? tabTree.selected[2].id : "", // 三级类目
}
});
});
/*下拉选择
new common.dropDown({
el: "#shopId",
ajax: "queryShop"
});*/
new common.dropDown({
el: "#brandId",
ajax: "brand",
params:function(){
return {userLimitFlag:true};
}
});
var tabTree = new common.tabTree("#sort");
tabTree.init();
var Bll = {
toast: function(content, fn) {
common.dialog.confirm("温馨提示", content, function() {
common.util.__ajax({
url: '/product/updateProductSknStatus',
data: fn()
}, function() {
g.reload();
loadTab();
});
});
}
}