|
@@ -360,45 +360,32 @@ $(function () {
|
|
|
dom: $('#sort-button5')
|
|
|
}
|
|
|
}
|
|
|
- if(typeMap[1].val) {
|
|
|
- // 每月订单数 1 降序 0 升序
|
|
|
- if( typeMap[1].val === 1){
|
|
|
- typeMap[1].dom.find('.icon-down').addClass('active');
|
|
|
+ const setActiveFn = function (type,num){
|
|
|
+ if( type === 0){
|
|
|
+ typeMap[num].dom.find('.icon-up').addClass('active');
|
|
|
}else{
|
|
|
- typeMap[1].dom.find('.icon-up').addClass('active');
|
|
|
+ typeMap[num].dom.find('.icon-down').addClass('active');
|
|
|
}
|
|
|
}
|
|
|
+ // 每月订单数 1 降序 0 升序
|
|
|
+ if(typeMap[1].val || typeMap[1].val === 0) {
|
|
|
+ setActiveFn(typeMap[1].val,1)
|
|
|
+ }
|
|
|
// 每年订单总数 1 降序 0 升序
|
|
|
- if(typeMap[2].val) {
|
|
|
- if (typeMap[2] === 1) {
|
|
|
- typeMap[2].dom.find('.icon-down').addClass('active');
|
|
|
- } else {
|
|
|
- typeMap[2].dom.find('.icon-up').addClass('active');
|
|
|
- }
|
|
|
+ if(typeMap[2].val || typeMap[2].val === 0) {
|
|
|
+ setActiveFn(typeMap[2].val,2)
|
|
|
}
|
|
|
// 每月总额 1 降序 0 升序
|
|
|
- if(typeMap[3].val) {
|
|
|
- if (typeMap[3] === 1) {
|
|
|
- typeMap[3].dom.find('.icon-down').addClass('active');
|
|
|
- } else {
|
|
|
- typeMap[3].dom.find('.icon-up').addClass('active');
|
|
|
- }
|
|
|
+ if(typeMap[3].val || typeMap[3].val === 0) {
|
|
|
+ setActiveFn(typeMap[3].val,3)
|
|
|
}
|
|
|
// 每年总额 1 降序 0 升序
|
|
|
- if(typeMap[4].val) {
|
|
|
- if (typeMap[4] === 1) {
|
|
|
- typeMap[4].dom.find('.icon-down').addClass('active');
|
|
|
- } else {
|
|
|
- typeMap[4].dom.find('.icon-up').addClass('active');
|
|
|
- }
|
|
|
+ if(typeMap[4].val || typeMap[4].val === 0) {
|
|
|
+ setActiveFn(typeMap[4].val,4)
|
|
|
}
|
|
|
// 总金额 1 降序 0 升序
|
|
|
- if(typeMap[5].val) {
|
|
|
- if (typeMap[5] === 1) {
|
|
|
- typeMap[5].dom.find('.icon-down').addClass('active');
|
|
|
- } else {
|
|
|
- typeMap[5].dom.find('.icon-up').addClass('active');
|
|
|
- }
|
|
|
+ if(typeMap[5].val || typeMap[5].val === 0) {
|
|
|
+ setActiveFn(typeMap[5].val,5)
|
|
|
}
|
|
|
$("#export").click(function () {
|
|
|
var formData = $('#searchForm').serialize()
|