|
|
@@ -1,11 +1,14 @@
|
|
|
<template>
|
|
|
<view class="app-content">
|
|
|
<view class="ex-page">
|
|
|
+ <view class="top-bar">
|
|
|
+ <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='选日期' />
|
|
|
+ </view>
|
|
|
<scroll-view scroll-y scroll-with-animation class="main-view">
|
|
|
<view class="space-view ex-table">
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
<t-table :headerBackgroundColor="'#F0F2F6'">
|
|
|
- <view style="position:fixed;width:100%;top:0">
|
|
|
+ <view style="width:100%;">
|
|
|
<t-tr header>
|
|
|
<t-th><view style="width:130upx;color:#333333;font-size:30upx;font-weight:bold;">时间</view></t-th>
|
|
|
<t-th><view style="width:120upx;color:#333333;font-size:30upx;font-weight:bold;">名称</view></t-th>
|
|
|
@@ -14,7 +17,7 @@
|
|
|
<t-th><view style="color:#333333;font-size:30upx;font-weight:bold;">剩余</view></t-th>
|
|
|
</t-tr>
|
|
|
</view>
|
|
|
- <view style="margin-top:80upx;">
|
|
|
+ <view style="margin-top:20upx;">
|
|
|
<t-tr v-for="(item, index) in list.data" :key="index">
|
|
|
<t-td align="center" color="info">
|
|
|
<view style="width:130upx;color:#333333;font-size:28upx;" @click="goDetail(item)">
|
|
|
@@ -67,13 +70,16 @@ import { getStockDetailApi } from "@/api/storehouse/stock";
|
|
|
import { getInfoByOrderSn } from "@/api/order";
|
|
|
import { list,selectShop } from "@/mixins";
|
|
|
import {mapActions, mapGetters} from "vuex";
|
|
|
+import DateSelect from "@/components/module/dateSelect";
|
|
|
export default {
|
|
|
- components: { SelectList, AppWrapperEmpty},
|
|
|
+ components: { SelectList, AppWrapperEmpty,DateSelect},
|
|
|
mixins: [list,selectShop],
|
|
|
computed: { ...mapGetters(["getDictionariesInfo","getLoginInfo"]) },
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+ searchTime:'',
|
|
|
+ startTime: "",
|
|
|
+ endTime: ""
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -93,6 +99,13 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
|
+ selectDateFn(val){
|
|
|
+ this.resetList()
|
|
|
+ this.searchTime = val.searchTime
|
|
|
+ this.startTime = val.startTime
|
|
|
+ this.endTime = val.endTime
|
|
|
+ this.getStockList()
|
|
|
+ },
|
|
|
init(){
|
|
|
if(this.option.name){
|
|
|
uni.setNavigationBarTitle({ title: this.option.name })
|
|
|
@@ -119,8 +132,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getStockList() {
|
|
|
- console.log(this.option)
|
|
|
- return getStockDetailApi({id:this.option.id,page: this.list.page}).then(res => {
|
|
|
+ return getStockDetailApi({id:this.option.id,page: this.list.page,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(res => {
|
|
|
this.completes(res)
|
|
|
});
|
|
|
}
|
|
|
@@ -129,15 +141,15 @@ export default {
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.ex-page {
|
|
|
+ background: white;
|
|
|
+ padding-top:20upx;
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
.top-bar {
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
+ margin-bottom:30px;
|
|
|
display: flex;
|
|
|
width: 100%;
|
|
|
- // box-shadow: 0 5upx 5upx 5upx rgba($color: #000000, $alpha: 0.2);
|
|
|
z-index: 20;
|
|
|
.bar{
|
|
|
width: 50%;
|