Commit 6a8559d8 by LJM

bug

parent 80ee0eaf
......@@ -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 @@
</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 class="no-date column rowCenter verCenter" v-else>
......@@ -91,61 +92,76 @@
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {
list: [],
countList: '',
formParams: {
goods_sn: '',
goods_name: '',
warehouse_id: '',
position_code: '',
stock_in_batch_sn: '',
sku_id: ''
}
};
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.reLaunch({
url: '/pages/index/index'
});
}
},
onLoad(options) {
this.formParams.goods_sn = options.goods_sn || '';
this.formParams.goods_name = options.goods_name || '';
this.formParams.warehouse_id = options.warehouse_id || '';
this.formParams.position_code = options.position_code || '';
this.formParams.stock_in_batch_sn = options.stock_in_batch_sn || '';
this.formParams.sku_id = options.sku_id || '';
},
onShow() {
this.getData();
},
methods: {
/**
* 获取列表数据
*/
getData() {
this.request(API.searchStockList, 'POST', this.formParams, true).then(res => {
if (res.code === 0) {
this.list = res.data.list;
this.countList = res.data.countList;
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
import { API } from '@/util/api.js';
export default {
data() {
return {
list: [],
countList: '',
page: 1,
limit: 30,
hasMoreData: true, //是否分页加载
formParams: {
goods_sn: '',
goods_name: '',
warehouse_id: '',
position_code: '',
stock_in_batch_sn: '',
sku_id: ''
}
});
};
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.reLaunch({
url: '/pages/index/index'
});
}
},
onLoad(options) {
this.formParams.goods_sn = options.goods_sn || '';
this.formParams.goods_name = options.goods_name || '';
this.formParams.warehouse_id = options.warehouse_id || '';
this.formParams.position_code = options.position_code || '';
this.formParams.stock_in_batch_sn = options.stock_in_batch_sn || '';
this.formParams.sku_id = options.sku_id || '';
},
onShow() {
this.getData();
},
methods: {
/**
* 获取列表数据
*/
getData() {
this.request(API.searchStockList, 'POST', { page: this.page, limit: this.limit, ...this.formParams }, true).then(res => {
if (res.code === 0) {
if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
this.countList = res.data.countList;
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
}
}
}
};
};
</script>
<style scoped lang="scss">
@import '@/assets/css/immediatelyStockIn/index.scss';
</style>
@import '@/assets/css/immediatelyStockIn/index.scss';
</style>
\ No newline at end of file
......@@ -5,7 +5,7 @@
<view class="time-interval-box row verCenter bothSide">
<view class="row verCenter">
<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" />
</picker>
</view>
......@@ -160,7 +160,23 @@
import { API } from '@/util/api.js';
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 {
data() {
return {
is_focus: true, //获取焦点动态化
......@@ -175,8 +191,8 @@
search_val: '',
from_position_code: '', //源库位
to_position_code: '', //目的库位
exec_start_time: '', //开始时间
exec_end_time: '' //结束时间
exec_start_time: formatDate(lastMonthDate), //开始时间
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