|
|
|
@ -2,7 +2,7 @@ |
|
|
|
<view> |
|
|
|
<view class="search"> |
|
|
|
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" @change="searchList" type="daterange" /> |
|
|
|
<u-search placeholder="输入收货人/货号/商品名称/供应商查询" v-model="keyword" @search="searchList" bg-color="#fff" |
|
|
|
<u-search placeholder="输入客户名称搜索" v-model="searchStr" @search="searchList" bg-color="#fff" |
|
|
|
:show-action="false" style="margin-top:10px;" border-color="#afd9ee"></u-search> |
|
|
|
</view> |
|
|
|
<view class="ulList" v-if="inventoryList.length > 0"> |
|
|
|
@ -33,13 +33,14 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
keyword: '', |
|
|
|
searchStr: '', |
|
|
|
type: '', |
|
|
|
inventoryList: [], |
|
|
|
status: 'loadmore', |
|
|
|
page: 1, |
|
|
|
totalPages: 0, |
|
|
|
// type:'', |
|
|
|
// type:'', |
|
|
|
range:[] |
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
@ -48,7 +49,8 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
this.getOrderInfoList() |
|
|
|
// this.getMonth(); |
|
|
|
this.getOrderInfoList() |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
if (this.page >= this.totalPages) return; |
|
|
|
@ -75,6 +77,9 @@ |
|
|
|
pageSize: 10, |
|
|
|
pageNumber: this.page |
|
|
|
}, |
|
|
|
startTime:this.range[0], |
|
|
|
endTime:this.range[1], |
|
|
|
searchStr:this.searchStr, |
|
|
|
status:this.listStatus |
|
|
|
}, false, false).then((res) => { |
|
|
|
this.status = 'nomore'; |
|
|
|
@ -115,6 +120,21 @@ |
|
|
|
uni.switchTab({ |
|
|
|
url: '/pages/inventory/goodsList1' |
|
|
|
}) |
|
|
|
}, |
|
|
|
//获取当月1日到当前时间 |
|
|
|
getMonth() { |
|
|
|
//获取新的时间 |
|
|
|
let date = new Date() |
|
|
|
//获取当前时间的年份转为字符串 |
|
|
|
let year = date.getFullYear().toString() //'年' |
|
|
|
//获取月份,由于月份从0开始,此处要加1,判断是否小于10,如果是在字符串前面拼接'0' |
|
|
|
let month = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1).toString():(date.getMonth()+1).toString() //'月' |
|
|
|
//获取天,判断是否小于10,如果是在字符串前面拼接'0' |
|
|
|
let da = date.getDate() < 10 ? '0'+date.getDate().toString():date.getDate().toString() //'日' |
|
|
|
//字符串拼接,开始时间,结束时间 |
|
|
|
let end = year + '-' + month + '-' + da //当天 |
|
|
|
let beg = year + '-' + month + '-01' //当月第一天 |
|
|
|
this.range = [beg,end] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|