刘翔宇-旅管家 3 years ago
parent 7a1267e5d3
commit d1153841d6

@ -354,7 +354,7 @@
that.orderCarerID = order.paramedic.id;
that.orderCarer = order.paramedic.name;
that.salePrice = order.price;
that.selectItem = 45;
that.selectItem = order.bed.area_id;
let edate = Date.parse(order.to_date);
let sdate = Date.parse(order.from_date);
console.log(edate - sdate)

@ -148,7 +148,7 @@
</view>
</view>
<scroll-view style="height: 100%;" scroll-y="true">
<view class="popupBody" >
<view class="popupBody">
<view class="searchBox" style="background-color: #E4E4E4;">
<input type="text" class="searchBoxInput" :focus="focusSet" style="color: black;"
@input='bindKeyWord' @confirm="loadPage(1)"></input>
@ -208,7 +208,8 @@
<view class='popbtn pop-btnReset' :style="[{width:windowWidth*0.8*0.5+'px'}]" @tap="bindreset">
<text class='pop-btnReset-text'>重置</text>
</view>
<view class='popbtn pop-btnSubmit' :style="[{width:windowWidth*0.8*0.5+'px'}]">
<view class='popbtn pop-btnSubmit' :style="[{width:windowWidth*0.8*0.5+'px'}]"
@tap="bindMoreSearch">
<text class='pop-btnSubmit-text'>提交</text>
</view>
</view>
@ -233,25 +234,43 @@
name: "天数",
list: [{
name: "1天",
value: 1,
checked: false
}, {
name: "2天",
value: 2,
checked: false
}, {
name: "3天",
value: 3,
checked: false
}, {
name: "4天",
value: 4,
checked: false
}, {
name: "5天",
value: 5,
checked: false
}, {
name: "6天",
value: 6,
checked: false
}]
},
{
name: "创建日期",
name: "服务开始日期",
list: [{
name: "当天",
value: 1,
checked: false
}, {
name: "当周",
value: 2,
checked: false
}, {
name: "当月",
value: 3,
checked: false
}]
@ -295,6 +314,9 @@
multiArray: [],
selectBuild: "",
selectArea: "",
selectDays: "",
selectSDate: "",
selectEDate: "",
buildIndex: 0
}
},
@ -338,6 +360,7 @@
},
methods: {
//tag中楼层点击
bindAreaTap: function(e) {
var index = e.currentTarget.dataset.index;
var _tags = this.multiArray[this.buildIndex].children;
@ -347,9 +370,10 @@
}
_tags[index].checked = true;
this.multiArray[this.buildIndex].children = _tags;
this.selectArea = _tags[index].id;
this.selectArea = _tags[index].value;
},
//tag中楼栋点击
bindBuildTap: function(e) {
this.selectArea = "";
var index = e.currentTarget.dataset.index;
@ -360,10 +384,11 @@
m.checked = false
}
_tags[index].checked = true;
this.selectBuild = _tags[index].value;
this.multiArray = _tags;
this.selectBuild = _tags[index].id;
},
//加载楼层楼栋
loadAreas: function() {
var that = this;
var currentProject = uni.getStorageSync('currentProject');
@ -412,13 +437,15 @@
mod.children = _carr;
arr.push(mod);
})
that.multiItems = that.multiArray = arr;
that.multiArray = arr;
that.multiItems = JSON.parse(JSON.stringify(arr));
},
utilFail: function(err) {
util.alert(err);
}
});
},
//打开更多搜索的抽屉
showDrawer() {
this.$refs.showRight.open();
},
@ -443,7 +470,8 @@
this.focusSet = true;
},
bindMoreSearch: function() {
this.moreSearch = true;
this.loadPage(1);
this.closeDrawer();
},
bindSearch: function() {
if (this.seachBoxShow) {
@ -481,7 +509,30 @@
m.checked = false
}
_tags[index].checked = true;
this.searchData = _searchData;
this.searchData = _searchData;
console.log(pindex)
if (pindex == 0) {
console.log("_tags[index]",_tags[index])
this.selectDays = _tags[index].value;
} else {
switch (_tags[index].value) {
case 1:
this.selectSDate = this.$moment().format("YYYY-MM-DD");
this.selectEDate = this.$moment().format("YYYY-MM-DD");
break;
case 2:
this.selectSDate = this.$moment().startOf('week').add(1, 'day').format('YYYY-MM-DD')
this.selectEDate = this.$moment().endOf('week').add(1, 'day').format('YYYY-MM-DD')
break;
case 3: //当月
this.selectSDate = this.$moment().startOf('month').format(
'YYYY-MM-DD'); //2020-12-01//本月第一天
this.selectEDate = this.$moment().endOf('month').format('YYYY-MM-DD'); //2020-12-31
break;
}
}
},
bindNavChange: function(e) {
var index = e.currentTarget.dataset.index;
@ -511,6 +562,15 @@
}
}
this.searchData = _searchData;
this.selectArea = "";
this.selectBuild = "";
var _data = this.multiItems;
this.multiArray = _data;
this.selectSDate="";
this.selectEDate="";
this.selectDays="";
this.loadPage(1);
},
loadPage: function(page) {
console.log(this.keyword)
@ -525,7 +585,12 @@
page: page,
page_size: 5,
keyword: that.keyword,
status: that.activeKey
status: that.activeKey,
building_id: that.selectBuild,
area_id: that.selectArea,
days: that.selectDays,
start_date_from:this.selectSDate,
start_date_to:this.selectEDate
},
utilSuccess: function(r) {
var res = r.data;

Loading…
Cancel
Save