Commit 6a8559d8 by LJM

bug

parent 80ee0eaf
...@@ -529,3 +529,94 @@ ...@@ -529,3 +529,94 @@
} }
} }
} }
.batchNotification {
position: relative;
width: 520rpx;
border-radius: 10rpx;
background: #fff;
padding: 70rpx 0 100rpx 50rpx;
.title {
position: absolute;
left: 12rpx;
top: 9rpx;
font-size: 26rpx;
font-weight: bold;
}
.pick_type_val {
position: absolute;
right: 6px;
top: 10rpx;
font-size: 17rpx;
color: #1969f9;
border: 1px solid #f0f0f2;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
}
.p1 {
font-size: 18rpx;
color: #292b33;
margin-bottom: 24rpx;
}
.text {
margin-bottom: 12rpx;
.t1 {
text-align: right;
font-size: 17rpx;
color: #292b33;
white-space: nowrap;
}
.t2 {
font-size: 18rpx;
color: #292b33;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.t3 {
font-size: 18rpx;
color: #f98119;
}
}
.desc {
font-size: 18rpx;
color: #f98119;
margin: 12rpx 0rpx;
}
.button-group {
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 90rpx;
display: flex;
flex-direction: row;
border-top-color: #f5f5f5;
border-top-style: solid;
border-top-width: 1px;
.button-left {
display: flex;
flex: 1;
flex-direction: row;
justify-content: center;
align-items: center;
height: 100%;
font-size: 26rpx;
}
.button-right {
display: flex;
flex: 1;
flex-direction: row;
justify-content: center;
align-items: center;
height: 100%;
border-left-color: #f0f0f0;
border-left-style: solid;
border-left-width: 1px;
font-size: 26rpx;
color: #007aff;
}
}
}
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="row rowCenter verCenter" v-if="!hasMoreData && page > 1" style="color: #999;font-size: 16rpx;padding: 10px 0;flex: 0 0 100%;font-weight: normal;">--&nbsp;已经到底了&nbsp;--</view>
</view> </view>
<!-- 无数据展示 --> <!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else> <view class="no-date column rowCenter verCenter" v-else>
...@@ -91,12 +92,15 @@ ...@@ -91,12 +92,15 @@
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
export default { export default {
data() { data() {
return { return {
list: [], list: [],
countList: '', countList: '',
page: 1,
limit: 30,
hasMoreData: true, //是否分页加载
formParams: { formParams: {
goods_sn: '', goods_sn: '',
goods_name: '', goods_name: '',
...@@ -107,6 +111,13 @@ export default { ...@@ -107,6 +111,13 @@ export default {
} }
}; };
}, },
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index == 0) { if (e.index == 0) {
uni.reLaunch({ uni.reLaunch({
...@@ -130,11 +141,16 @@ export default { ...@@ -130,11 +141,16 @@ export default {
* 获取列表数据 * 获取列表数据
*/ */
getData() { getData() {
this.request(API.searchStockList, 'POST', this.formParams, true).then(res => { this.request(API.searchStockList, 'POST', { page: this.page, limit: this.limit, ...this.formParams }, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.list = res.data.list; if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
this.countList = res.data.countList; this.countList = res.data.countList;
} else { } else {
this.hasMoreData = false;
}
} else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'error' icon: 'error'
...@@ -143,9 +159,9 @@ export default { ...@@ -143,9 +159,9 @@ export default {
}); });
} }
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/immediatelyStockIn/index.scss'; @import '@/assets/css/immediatelyStockIn/index.scss';
</style> </style>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="time-interval-box row verCenter bothSide"> <view class="time-interval-box row verCenter bothSide">
<view class="row verCenter"> <view class="row verCenter">
<text class="iconfont icon-juxing4"></text> <text class="iconfont icon-juxing4"></text>
<picker mode="date" @change="bindTimeChange(1, $event)"> <picker mode="date" @change="bindTimeChange(1, $event)" :value="searchParams.exec_start_time">
<input type="text" class="uni-input" placeholder="请选择起始时间" placeholder-style="color:#919399" v-model="searchParams.exec_start_time" /> <input type="text" class="uni-input" placeholder="请选择起始时间" placeholder-style="color:#919399" v-model="searchParams.exec_start_time" />
</picker> </picker>
</view> </view>
...@@ -160,7 +160,23 @@ ...@@ -160,7 +160,23 @@
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
// 获取当前日期
const currentDate = new Date();
// 获取前一个月的日期
const lastMonthDate = new Date(currentDate);
lastMonthDate.setMonth(currentDate.getMonth() - 1);
// 格式化日期为 YYYY-MM-DD
const formatDate = (date) => {
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
};
export default { export default {
data() { data() {
return { return {
is_focus: true, //获取焦点动态化 is_focus: true, //获取焦点动态化
...@@ -175,8 +191,8 @@ ...@@ -175,8 +191,8 @@
search_val: '', search_val: '',
from_position_code: '', //源库位 from_position_code: '', //源库位
to_position_code: '', //目的库位 to_position_code: '', //目的库位
exec_start_time: '', //开始时间 exec_start_time: formatDate(lastMonthDate), //开始时间
exec_end_time: '' //结束时间 exec_end_time: formatDate(currentDate) //结束时间
} }
}; };
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment