goods.priceExport.Index.js
1.33 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
webpackJsonp([50],[
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $ = __webpack_require__(1),
common = __webpack_require__(2);
new common.dropDown({
el: '#shop',
ajax: 'shopsRest'
});
new common.dropDown({
el: '#brand',
ajax: 'brand',
params:function(){
return {userLimitFlag:true};
}
});
//多级菜单
var tabTree = new common.tabTree("#sortTree", {status: 1, sortLevel: 1});
tabTree.init();
/***********************批量导出***********************/
$("#batchExportPrice").click(function(){
var select = tabTree.getAddress();
var shopId = common.util.__input("shop");
var brandId = common.util.__input("brand");
//if(!shopId && !brandId && !(select[0] && select[0].id)){
// alert("请至少选择一个筛选条件后再导出!");
// return false;
//}
var getResult=function(){
return {
shop_id: shopId,
brand_id: brandId,
stock: 1,
status: 1,
max_sort_id: select[0] ? select[0].id : "",
middle_sort_id: select[1] ? select[1].id : "",
small_sort_id: select[2] ? select[2].id : ""
}
}
window.open("/ajax/down?queryConf=" + JSON.stringify(getResult()) + "&type=productPriceExport");
});
/***/ }
]);