Просмотр исходного кода

库存(明细还没处理完)--明细已处理

jf 5 лет назад
Родитель
Сommit
86e24f9838
1 измененных файлов с 33 добавлено и 21 удалено
  1. 33 21
      ghsApp/src/pagesStorehouse/stockWarn/detailed.vue

+ 33 - 21
ghsApp/src/pagesStorehouse/stockWarn/detailed.vue

@@ -3,13 +3,13 @@
 		<view class="top-bar">
 		<view class="top-bar">
 <!--			<SelectList :list="selectListData" @search="searchSelectEvent" />-->
 <!--			<SelectList :list="selectListData" @search="searchSelectEvent" />-->
 
 
-				<DorpdownSelect
+				<DorpdownSelect class="bar"
 					:menuObj="menuTimeObj"
 					:menuObj="menuTimeObj"
 					:selectItemId.sync="selectTimeId"
 					:selectItemId.sync="selectTimeId"
 					:typeSelect="1" top="0px"
 					:typeSelect="1" top="0px"
 					@selectSussess="selectSussess" />
 					@selectSussess="selectSussess" />
 
 
-			<DorpdownSelect
+			<DorpdownSelect class="bar"
 				:menuObj.sync="menuObj"
 				:menuObj.sync="menuObj"
 				:selectItemId.sync="shopId"
 				:selectItemId.sync="shopId"
 				top="0"
 				top="0"
@@ -73,13 +73,13 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
 
 
 import SelectList from "@/components/plugin/selectList";
 import SelectList from "@/components/plugin/selectList";
 import { getStockDetailApi } from "@/api/storehouse/stock";
 import { getStockDetailApi } from "@/api/storehouse/stock";
-import { list } from "@/mixins";
+import { list,selectShop } from "@/mixins";
 import DorpdownSelect from "@/components/module/dorpdownSelect";
 import DorpdownSelect from "@/components/module/dorpdownSelect";
 import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
 import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
 import {mapActions, mapGetters} from "vuex";
 import {mapActions, mapGetters} from "vuex";
 export default {
 export default {
 	components: { SelectList, AppWrapperEmpty,DorpdownSelect,rangeDatePick },
 	components: { SelectList, AppWrapperEmpty,DorpdownSelect,rangeDatePick },
-	mixins: [list],
+	mixins: [list,selectShop],
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	data() {
 	data() {
 		return {
 		return {
@@ -148,7 +148,14 @@ export default {
 					color: "info"
 					color: "info"
 				}
 				}
 			],
 			],
-			dataList: []
+			dataList: [],
+			params:{
+				itemId: '',
+				searchTime:'',
+				startTime: "",
+				endTime: "",
+				shopId: "",
+			},
 		};
 		};
 	},
 	},
 	onPullDownRefresh() {
 	onPullDownRefresh() {
@@ -158,7 +165,8 @@ export default {
 		});
 		});
 	},
 	},
 	onLoad(e) {
 	onLoad(e) {
-		this.itemId = e.id
+		this.itemId = e.id;
+		this.params.itemId = e.id;
 
 
 		let dateDefaultOption = [];
 		let dateDefaultOption = [];
 		let list = this.getDictionariesInfo.dateDefaultOption;
 		let list = this.getDictionariesInfo.dateDefaultOption;
@@ -178,44 +186,39 @@ export default {
 		...mapActions(['setUserShopAll']),
 		...mapActions(['setUserShopAll']),
 		// 选择分店
 		// 选择分店
 		selectShopSussess(val){
 		selectShopSussess(val){
-			console.log(val)
+			this.params.shopId = val.selectItem.id;
+			this.init();
 		},
 		},
 		//选择时间
 		//选择时间
 		selectSussess(val) {
 		selectSussess(val) {
+			this.params.selectTime = this.selectTimeId;
 			if(val.select=='自定义'){
 			if(val.select=='自定义'){
 				this.selectTime();
 				this.selectTime();
 			}else{
 			}else{
-				console.log(val)
-				console.log('同步组件selectTimeId',this.selectTimeId)
+				this.init();
 			}
 			}
 
 
 		},
 		},
 		//选择时间-自定义时间
 		//选择时间-自定义时间
-		selectTime(type){
+		selectTime(){
 			this.customizationTime = [time,time],
 			this.customizationTime = [time,time],
 				this.isShow = true;
 				this.isShow = true;
 		},
 		},
 		//选择自定义时间确定
 		//选择自定义时间确定
 		timeChange(e){
 		timeChange(e){
 			this.isShow = false;
 			this.isShow = false;
-			console.log('e',e)
-			console.log('selectTimeId',this.selectTimeId)
+			this.params.startTime = e[0]
+			this.params.endTime = e[1]
+			this.init();
 		},
 		},
 		//选择自定义时间取消
 		//选择自定义时间取消
 		timeCancel(e){this.isShow = false;},
 		timeCancel(e){this.isShow = false;},
-		searchSelectEvent(params) {
-			console.log(3333, params);
-		},
+
 		async init() {
 		async init() {
 			this._list();
 			this._list();
 		},
 		},
 		_list() {
 		_list() {
-			let params = {
-				itemId: this.itemId,
-				start_date: "",
-				end_date: ""
-			};
-			return getStockDetailApi(params).then(res => {
+			return getStockDetailApi(this.params).then(res => {
 				this.completes(res);
 				this.completes(res);
 			});
 			});
 		}
 		}
@@ -230,9 +233,18 @@ export default {
 	.top-bar {
 	.top-bar {
 		position: absolute;
 		position: absolute;
 		left: 0;
 		left: 0;
+		display: flex;
 		width: 100%;
 		width: 100%;
 		// box-shadow: 0 5upx 5upx 5upx rgba($color: #000000, $alpha: 0.2);
 		// box-shadow: 0 5upx 5upx 5upx rgba($color: #000000, $alpha: 0.2);
 		z-index: 20;
 		z-index: 20;
+		.bar{
+			width: 50%;
+			height: 100%;
+			text-align: center;
+			&:nth-child(1){
+				border-right: 1px solid #eeeeec;
+			}
+		}
 	}
 	}
 	.main-view {
 	.main-view {
 		margin-top: 80upx;
 		margin-top: 80upx;