|
|
@@ -1,7 +1,19 @@
|
|
|
<template>
|
|
|
<view class="ex-page">
|
|
|
<view class="top-bar">
|
|
|
- <SelectList :list="selectListData" @search="searchSelectEvent" />
|
|
|
+<!-- <SelectList :list="selectListData" @search="searchSelectEvent" />-->
|
|
|
+
|
|
|
+ <DorpdownSelect
|
|
|
+ :menuObj="menuTimeObj"
|
|
|
+ :selectItemId.sync="selectTimeId"
|
|
|
+ :typeSelect="1" top="0px"
|
|
|
+ @selectSussess="selectSussess" />
|
|
|
+
|
|
|
+ <DorpdownSelect
|
|
|
+ :menuObj.sync="menuObj"
|
|
|
+ :selectItemId.sync="shopId"
|
|
|
+ top="0"
|
|
|
+ @selectSussess="selectShopSussess" />
|
|
|
</view>
|
|
|
<scroll-view scroll-y scroll-with-animation class="main-view">
|
|
|
<view class="space-view ex-table">
|
|
|
@@ -13,12 +25,7 @@
|
|
|
</t-th>
|
|
|
</t-tr>
|
|
|
<t-tr v-for="(item, index) in list.data" :key="index">
|
|
|
- <t-td
|
|
|
- v-for="(column, colIndex) in columns"
|
|
|
- :key="colIndex"
|
|
|
- :align="column.align"
|
|
|
- :color="column.color"
|
|
|
- >
|
|
|
+ <t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color">
|
|
|
<view v-if="column.custom == 'change'">
|
|
|
{{ `${item.smallNumOrder}/${item.bigNumOrder}` }}
|
|
|
</view>
|
|
|
@@ -47,20 +54,42 @@
|
|
|
</block>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
+
|
|
|
+ <!-- 时间段选择-->
|
|
|
+ <rangeDatePick
|
|
|
+ :show="isShow"
|
|
|
+ start="2000-01-01"
|
|
|
+ end="2200-12-01"
|
|
|
+ :value="customizationTime"
|
|
|
+ @change="timeChange"
|
|
|
+ @cancel="timeCancel"
|
|
|
+ themeColor="#4C83D6" fields="day"></rangeDatePick>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
+const Month = (new Date().getMonth()+1)<10?'0'+(new Date().getMonth()+1):new Date().getMonth()+1
|
|
|
+const time = `${new Date().getFullYear()}-${Month}-${new Date().getDate()}`;
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
|
|
|
import SelectList from "@/components/plugin/selectList";
|
|
|
import { getStockDetailApi } from "@/api/storehouse/stock";
|
|
|
import { list } from "@/mixins";
|
|
|
-
|
|
|
+import DorpdownSelect from "@/components/module/dorpdownSelect";
|
|
|
+import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
|
|
|
+import {mapActions, mapGetters} from "vuex";
|
|
|
export default {
|
|
|
- components: { SelectList, AppWrapperEmpty },
|
|
|
+ components: { SelectList, AppWrapperEmpty,DorpdownSelect,rangeDatePick },
|
|
|
mixins: [list],
|
|
|
+ computed: { ...mapGetters(["getDictionariesInfo","getLoginInfo"]) },
|
|
|
data() {
|
|
|
return {
|
|
|
+ isShow:false,
|
|
|
+ customizationTime:'',
|
|
|
+ menuTimeObj:'',//时间分类-类型
|
|
|
+ menuShopObj:'',//门店分类-类型
|
|
|
+ selectTimeId:'',//选择时间id
|
|
|
+ shopId:'',//选择分店id
|
|
|
+ itemId:'',
|
|
|
selectListData: [
|
|
|
{
|
|
|
title: "时间",
|
|
|
@@ -128,19 +157,61 @@ export default {
|
|
|
uni.stopPullDownRefresh();
|
|
|
});
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad(e) {
|
|
|
+ this.itemId = e.id
|
|
|
+
|
|
|
+ let dateDefaultOption = [];
|
|
|
+ let list = this.getDictionariesInfo.dateDefaultOption;
|
|
|
+ for (let i=0;i<list.length;i++){
|
|
|
+ dateDefaultOption.push({name:list[i].name,id:list[i].value})
|
|
|
+ }
|
|
|
+ this.menuTimeObj = {title:'时间',titleChild:'时间',list: dateDefaultOption};
|
|
|
+
|
|
|
+ this.shopId = this.getLoginInfo.shopId;
|
|
|
+ console.log(' this.selectShopId',this.shopId)
|
|
|
+ console.log(' this.getLoginInfo.shopId',this.getLoginInfo.shopId)
|
|
|
+ // console.log('userShopAll',this.setUserShopAll())
|
|
|
+
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...mapActions(['setUserShopAll']),
|
|
|
+ // 选择分店
|
|
|
+ selectShopSussess(val){
|
|
|
+ console.log(val)
|
|
|
+ },
|
|
|
+ //选择时间
|
|
|
+ selectSussess(val) {
|
|
|
+ if(val.select=='自定义'){
|
|
|
+ this.selectTime();
|
|
|
+ }else{
|
|
|
+ console.log(val)
|
|
|
+ console.log('同步组件selectTimeId',this.selectTimeId)
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //选择时间-自定义时间
|
|
|
+ selectTime(type){
|
|
|
+ this.customizationTime = [time,time],
|
|
|
+ this.isShow = true;
|
|
|
+ },
|
|
|
+ //选择自定义时间确定
|
|
|
+ timeChange(e){
|
|
|
+ this.isShow = false;
|
|
|
+ console.log('e',e)
|
|
|
+ console.log('selectTimeId',this.selectTimeId)
|
|
|
+ },
|
|
|
+ //选择自定义时间取消
|
|
|
+ timeCancel(e){this.isShow = false;},
|
|
|
searchSelectEvent(params) {
|
|
|
- console.log(3333, pramrs);
|
|
|
+ console.log(3333, params);
|
|
|
},
|
|
|
async init() {
|
|
|
this._list();
|
|
|
},
|
|
|
_list() {
|
|
|
let params = {
|
|
|
- itemId: 1,
|
|
|
+ itemId: this.itemId,
|
|
|
start_date: "",
|
|
|
end_date: ""
|
|
|
};
|