Explorar el Código

时间和门店选择器

shish hace 4 años
padre
commit
58f39c04f7

+ 2 - 5
ghsApp/src/admin/changePrice/list.vue

@@ -55,19 +55,16 @@ import AppSearchModule from "@/components/module/app-search";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemComponent from "./components/Item";
 import productMins from "@/mixins/product";
-import { selectShop } from "@/mixins";
 import { mapGetters } from "vuex";
-import DorpdownSelect from "@/components/module/shopSelect";
 import { batchChangePrice,generatePriceTable } from '@/api/product/index'
 export default {
 	name: "item_list",
 	components: {
 		AppSearchModule,
 		AppWrapperEmpty,
-		ItemComponent,
-		DorpdownSelect
+		ItemComponent
 	},
-	mixins: [productMins, selectShop],
+	mixins: [productMins],
 	data() {
 		return {
 			autoLoad: false, //不自动请求数据  自定义请求

+ 12 - 18
ghsApp/src/admin/home/me.vue

@@ -28,7 +28,7 @@
                 </view>
               </view>
             </view>
-            <button v-if="loginInfo.switchShop" @click="shopShow" class="admin-button-com default chang-shop_btn" >
+            <button v-if="getLoginInfo.switchShop" @click="showAllShop" class="admin-button-com default chang-shop_btn" >
               <i class="iconfont iconqiehuan1"></i>
               切换店铺
             </button>
@@ -110,7 +110,7 @@
         <none-hd :show="no_shop_show_model" :title="MODEL_TITLE" :btnText="MODEL_BTN_TEXT" @bthClick="toFreeApply_HOME" :authShow="true" experienceFun></none-hd>
       </view>
     </template>
-    <DorpdownSelect ref="dorpdownSelect" :menuObj.sync="menuObj" top="0upx" :isShowTit="false" :selectItemId.sync="shopId" @selectSussess="selectSussess" ></DorpdownSelect>
+    <ShopSelect ref="shopSelectComponent" class="bar" :isShowTit="false" top="0upx" @selectShopFn="selectShopFn" />
   </view>
 </template>
 
@@ -119,20 +119,17 @@ import AppAvatarModule from "@/components/module/app-avatar";
 import TuiListCell from "@/components/plugin/list-cell";
 import { mainMy, applyCash } from "@/api/home";
 import { toggleShop } from "@/api/common";
-import DorpdownSelect from "@/components/module/shopSelect";
-import { selectShop } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
 import { list } from "@/mixins";
 import { mapGetters } from "vuex";
-
 export default {
-  // 我的
-  name: "Me",
+  name: "me",
   components: {
     AppAvatarModule,
     TuiListCell,
-    DorpdownSelect,
+    ShopSelect,
   },
-  mixins: [selectShop, list],
+  mixins: [list],
   computed: {
     ...mapGetters(["getLoginInfo"]),
   },
@@ -152,16 +149,15 @@ export default {
     }
   },
   methods: {
-    shopShow () {
-      this.shopId = this.getLoginInfo.shopId;
-      this.$refs.dorpdownSelect.dropdownShow = true;
+    showAllShop () {
+      this.$refs.shopSelectComponent.dropdownShow = true;
     },
     async init () {
       if(!this.no_shop_show_model) {
         try {
           const { data } = await mainMy();
           this.shopInfo = data;
-          //不要删除此输出,方查看 shish 20210512
+          //不要删除此输出,方便查看 shish 20210512
           console.log('商家ID',data.sjId,'门店ID',data.shopId)
           uni.stopPullDownRefresh();
         } finally {
@@ -193,12 +189,10 @@ export default {
         })
     },
     // #endif
-    async selectSussess () {
-      uni.showLoading({
-        title: "加载中",
-      });
+    async selectShopFn (val) {
+      uni.showLoading({ title: "加载中", })
       try {
-        await toggleShop({ shopId: this.shopId })
+        await toggleShop({ shopId: val.id })
         //有多处相似地方,请全项目搜索about_store_clear
         // #ifdef MP-WEIXIN
         this.$store.commit("setLoginInfo", {})

+ 18 - 66
ghsApp/src/admin/home/order.vue

@@ -12,14 +12,7 @@
       </view>
 
       <view class="select-dn_bx">
-        <DropShopSelect
-          :menuObj="menuObj"
-          :selectItemId.sync="selectItemId"
-          :typeSelect="1"
-          top="0upx"
-          @selectSussess="selectSussess"
-          :typeTime="true"
-        />
+        <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
       </view>
     </view>
     <view class="app-tabs">
@@ -49,46 +42,32 @@
       </block>
     </div>
 
-    <rangeDatePick
-      :show="isShow"
-      start="2000-01-01"
-      end="2200-12-01"
-      :value="customizationTime"
-      @change="timeChange"
-      @cancel="timeCancel"
-      themeColor="#4C83D6"
-      fields="day"
-    ></rangeDatePick>
   </div>
 </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 AppTabs from "@/components/plugin/tabs";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ModalModule from "@/components/plugin/modal";
 import { list } from "@/mixins";
 import { mapGetters } from "vuex";
-import { getListB, freeShipping,confirmFinish,cancel } from "@/api/order";
+import { getListB} from "@/api/order";
 import AppSearchModule from "@/components/module/app-search";
 import DropShopSelect from "@/components/module/shopSelect";
-import rangeDatePick from "@/components/pyh-rdtpicker/pyh-rdtpicker.vue";
-import BLE from "@/mixins/BLE";
 import orderMixin from "@/mixins/order";
 import OrderItem from "./components/OrderItem";
+import DateSelect from "@/components/module/dateSelect";
 export default {
   name: "order-list",
   components: {
-    rangeDatePick,
     AppTabs,
     AppWrapperEmpty,
     ModalModule,
     AppSearchModule,
     DropShopSelect,
     OrderItem,
+    DateSelect
   },
-  mixins: [list,BLE,orderMixin],
+  mixins: [list,orderMixin],
   computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },
   data() {
     return {
@@ -97,7 +76,6 @@ export default {
       isShow: false, //是否显选择时间段
       customizationTime: [], //时间段
       customizationTimeType: "", //时间段
-      menuObj: "", //时间筛选列表
       tabIndex: 0,
       tabs: [
         {
@@ -137,6 +115,9 @@ export default {
       },
       searchType:0,
       searchTypeName:'客户',
+      selectTime:'',
+      startTime:'',
+      endTime:''
     };
   },
   onPullDownRefresh() {
@@ -157,18 +138,6 @@ export default {
   mounted() {
   },
   onLoad(option) {
-    let dateDefaultOption = [];
-    let list = this.getDictionariesInfo.dateDefaultOption;
-    if (!this.$util.isEmpty(list)){
-      for (let i = 0; i < list.length; i++) {
-        dateDefaultOption.push({ name: list[i].name, id: list[i].value });
-      }
-    }
-    this.menuObj = {
-      title: "时间",
-      titleChild: "时间",
-      list: dateDefaultOption,
-    };
     let tabIndex = uni.getStorageSync("switchTabQuery") || null;
     if (tabIndex) {
       uni.removeStorageSync("switchTabQuery");
@@ -195,40 +164,23 @@ export default {
         }
       })
     },
-    selectTime(type) {
-      (this.customizationTime = [time, time]),
-        (this.customizationTimeType = type),
-        (this.isShow = true);
-    },
-    //选择自定义时间确定
-    timeChange(e) {
-      this.isShow = false;
+    selectDateFn(val) {
+      this.selectTime = val.selectTime
+      this.startTime = val.startTime
+      this.endTime = val.endTime
       this.resetList();
-      this._list(this.customizationTimeType, e);
-    },
-    //选择自定义时间取消
-    timeCancel(e) {
-      this.isShow = false;
-    },
-    selectSussess(val) {
-      console.log(val);
-      if (val.select == "自定义") {
-        this.selectTime(val.selectItem.id);
-      } else {
-        this.resetList();
-        this._list(val.selectItem.id, "");
-      }
+      this._list();
     },
     searchFn(e) {
       this.resetList();
       this.seekVal = e;
-      this._list();
+      this._list()
     },
-    _list(type, timeArr) {
+    _list() {
       return getListB({
-        searchTime: type,
-        startTime: timeArr ? timeArr[0] : "",
-        endTime: timeArr ? timeArr[1] : "",
+        searchTime: this.selectTime,
+        startTime: this.startTime,
+        endTime: this.endTime,
         status: this.tabs[this.tabIndex].id,
         name: this.seekVal,
         page: this.list.page,

+ 2 - 7
ghsApp/src/admin/item/list.vue

@@ -47,11 +47,8 @@
 import AppSearchModule from "@/components/module/app-search";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemStock from "./components/ItemStock";
-import { STOCK_TYPE } from "@/utils/declare";
 import productMins from "@/mixins/product";
-import { selectShop } from "@/mixins";
 import { mapGetters } from "vuex";
-import DorpdownSelect from "@/components/module/shopSelect";
 import { getWeixinId } from "@/api/invite/index";
 import { generatePriceTable,generateBarcodeTable } from '@/api/product/index'
 // #ifdef APP-PLUS
@@ -62,13 +59,11 @@ export default {
 	components: {
 		AppSearchModule,
 		AppWrapperEmpty,
-		ItemStock,
-		DorpdownSelect
+		ItemStock
 	},
-	mixins: [productMins, selectShop],
+	mixins: [productMins],
 	data() {
 		return {
-			STOCK_TYPE,
 			autoLoad: false,
 			selectJobType: "stock",
 			tabIndex: 0,

+ 2 - 6
ghsApp/src/admin/ptItem/itemList.vue

@@ -40,20 +40,16 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ptItemInfo from "./components/Item";
 import productMins from "@/mixins/product";
 import productContraposeMins from "@/mixins/ptProductContrapose";
-import { selectShop } from "@/mixins";
 import { mapGetters } from "vuex";
-import DorpdownSelect from "@/components/module/shopSelect";
 import { getAllItemClass } from "@/api/item-class";
-
 export default {
 	name: "ptItemList",
 	components: {
 		AppSearchModule,
 		AppWrapperEmpty,
-		ptItemInfo,
-		DorpdownSelect
+		ptItemInfo
 	},
-	mixins: [productMins, selectShop,productContraposeMins],
+	mixins: [productMins, productContraposeMins],
 	data() {
 		return {
 			autoLoad: false,

+ 19 - 102
ghsApp/src/admin/staff/achieve.vue

@@ -2,18 +2,8 @@
 <view class="app-content">
 	<view class="ex-page">
 		<view class="top-bar">
-				<DorpdownSelect class="bar"
-					:menuObj="menuTimeObj"
-					:selectItemId.sync="selectTimeId"
-																				:typeTime="true"
-					:typeSelect="1" top="0upx"
-					@selectSussess="selectSussess" />
-
-			<DorpdownSelect class="bar"
-				:menuObj.sync="menuObj"
-				:selectItemId.sync="shopId"
-				top="0"
-				@selectSussess="selectShopSussess" />
+			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+			<ShopSelect class="bar" top="0" @selectShopFn="selectShopFn" />
 		</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
 			<view class="space-view ex-table">
@@ -38,71 +28,27 @@
 				</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>
-      <!-- <kd-entrance></kd-entrance> -->
 	</view>
 </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 { getStatYj } from "@/api/statistics/index";
-import { list,selectShop } from "@/mixins";
-import DorpdownSelect from "@/components/module/shopSelect";
-import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
+import DateSelect from "@/components/module/dateSelect";
 import {mapActions, mapGetters} from "vuex";
 export default {
-	components: { SelectList, AppWrapperEmpty,DorpdownSelect,rangeDatePick },
-	mixins: [list,selectShop],
+	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect },
+	mixins: [list],
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	data() {
 		return {
 			isShow:false,
 			customizationTime:'',
-			menuTimeObj:'',//时间分类-类型
-			menuShopObj:'',//门店分类-类型
-			selectTimeId:'',//选择时间id
-			shopId:'',//选择分店id
+			shopId:'',
 			itemId:'',
-			selectListData: [
-				{
-					title: "时间",
-					key: "time",
-					default: "1",
-					data: [
-						{
-							name: "下午",
-							value: "1"
-						}
-					]
-				},
-				{
-					title: "全部",
-					key: "shopId",
-					default: "01",
-					data: [
-						{
-							name: "瑞景店",
-							value: "01"
-						},
-						{
-							name: "加州店",
-							value: "02"
-						}
-					]
-				}
-			],
 			nowTime: "",
 			showTimeDropdown: false,
 			nowShop: "",
@@ -139,60 +85,31 @@ export default {
 	},
 	onPullDownRefresh() {
 		this.resetList();
-		this._list().then(res => {
+		this.yjList().then(res => {
 			uni.stopPullDownRefresh();
 		});
 	},
 	onLoad(e) {
 		this.itemId = e.id;
 		this.params.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;
-
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
-		// 选择分店
-		selectShopSussess(val){
-			this.params.shopId = val.selectItem.id;
+		//选择分店
+		selectShopFn(val){
+			this.params.shopId = val.id;
 			this.init();
 		},
 		//选择时间
-		selectSussess(val) {
-			this.params.selectTime = this.selectTimeId;
-			if(val.select=='自定义'){
-				this.selectTime();
-			}else{
-				this.init();
-			}
-
+		selectDateFn(val) {
+			this.params = {...this.params,...val}
+			this.init();			
 		},
-		//选择时间-自定义时间
-		selectTime(){
-			this.customizationTime = [time,time],
-				this.isShow = true;
-		},
-		//选择自定义时间确定
-		timeChange(e){
-			this.isShow = false;
-			this.params.startTime = e[0]
-			this.params.endTime = e[1]
-			this.init();
-		},
-		//选择自定义时间取消
-		timeCancel(e){this.isShow = false;},
-
 		async init() {
-			this._list();
+			this.yjList();
 		},
-		_list() {
+		yjList() {
 			return getStatYj(this.params).then(res => {
 				this.completes(res);
 			});
@@ -204,13 +121,13 @@ export default {
 .ex-page {
 	height: 100%;
 	display: flex;
+	background: white;
 	flex-direction: column;
 	.top-bar {
 		position: absolute;
 		left: 0;
 		display: flex;
 		width: 100%;
-		// box-shadow: 0 5upx 5upx 5upx rgba($color: #000000, $alpha: 0.2);
 		z-index: 20;
 		.bar{
 			width: 50%;
@@ -279,4 +196,4 @@ export default {
 		}
 	}
 }
-</style>
+</style>

+ 0 - 4
ghsApp/src/admin/statistics/cgStat.vue

@@ -49,10 +49,6 @@ export default {
 			customizationTime:[],
 			shopId:'',
 			itemId:'',
-			selectListData: [
-				{ title: "时间", key: "time", default: "1", data: [ { name: "下午", value: "1" } ] },
-				{ title: "全部", key: "shopId", default: "01", data: [ { name: "瑞景店", value: "01" }, { name: "加州店", value: "02" } ] }
-			],
 			nowTime: "",
 			showTimeDropdown: false,
 			nowShop: "",

+ 13 - 95
ghsApp/src/admin/statistics/customSale.vue

@@ -8,17 +8,8 @@
 		</view>
 
 		<view class="top-bar">
-			<DateSelect class="bar"
-				:menuObj="menuTimeObj"
-				:selectItemId.sync="selectTimeId"
-				:typeTime="true"
-				:typeSelect="1" top="0"
-				@selectSussess="selectSussess" />
-			<DorpdownSelect class="bar"
-				:menuObj.sync="menuObj"
-				:selectItemId.sync="shopId"
-				top="0"
-				@selectSussess="selectShopSussess" />
+			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+			<ShopSelect class="bar" top="0" @selectShopFn="selectShopFn" />
 		</view>
 
 		<view class="main-view">
@@ -45,72 +36,30 @@
 			</view>
 		</view>
 
-		<rangeDatePick
-			:show="isShow"
-			start="2000-01-01"
-			end="2200-12-01"
-			:value="customizationTime"
-			@change="timeChange"
-			@cancel="timeCancel"
-			themeColor="#4C83D6" fields="day"></rangeDatePick>
 
 	</view>
 </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 { getStatKhCgProfile } from "@/api/statistics/index";
 import { changeLevel } from "@/api/custom";
-import { list,selectShop } from "@/mixins";
-import DorpdownSelect from "@/components/module/shopSelect";
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
 import DateSelect from "@/components/module/dateSelect";
-import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
 import AppSearchModule from "@/components/module/app-search";
 import {mapActions, mapGetters} from "vuex";
 export default {
-	components: { SelectList, AppWrapperEmpty,DorpdownSelect,rangeDatePick,AppSearchModule,DateSelect },
-	mixins: [list,selectShop],
+	components: { SelectList, AppWrapperEmpty,ShopSelect,AppSearchModule,DateSelect },
+	mixins: [list],
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	data() {
 		return {
 			isShow:false,
 			customizationTime:[],
-			menuTimeObj:'',//时间分类-类型
-			menuShopObj:'',//门店分类-类型
-			selectTimeId:'',//选择时间id
-			shopId:'',//选择分店id
+			shopId:'',
 			itemId:'',
-			selectListData: [
-				{
-					title: "时间",
-					key: "time",
-					default: "1",
-					data: [
-						{
-							name: "下午",
-							value: "1"
-						}
-					]
-				},
-				{
-					title: "全部",
-					key: "shopId",
-					default: "01",
-					data: [
-						{
-							name: "瑞景店",
-							value: "01"
-						},
-						{
-							name: "加州店",
-							value: "02"
-						}
-					]
-				}
-			],
 			nowTime: "",
 			showTimeDropdown: false,
 			nowShop: "",
@@ -157,14 +106,6 @@ export default {
 	onLoad(e) {
 		this.itemId = e.id;
 		this.params.itemId = e.id;
-		let dateDefaultOption = [];
-		let list = this.getDictionariesInfo.dateDefaultOption;
-		if(!this.$util.isEmpty(list)){
-			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;
 	},
 	methods: {
@@ -189,38 +130,15 @@ export default {
 				that.profile = that.storageData
 			}
 		},
-		// 选择分店
-		selectShopSussess(val){
-			this.params.shopId = val.selectItem.id;
+		//选择分店
+		selectShopFn(val){
+			this.params.shopId = val.id;
 			this.init();
 		},
 		//选择时间
-		selectSussess(val) {
-			this.params.selectTime = this.selectTimeId;
-			if(val.custom==1){
-				this.isShow = false;
-				this.params.startTime = val.start
-				this.params.endTime = val.end
-				this.init();
-			}else{
-				this.init();
-			}
-		},
-		//选择时间-自定义时间
-		selectTime(){
-			this.customizationTime = [time,time],
-				this.isShow = true;
-		},
-		//选择自定义时间确定
-		timeChange(e){
-			this.isShow = false;
-			this.params.startTime = e[0]
-			this.params.endTime = e[1]
-			this.init();
-		},
-		//选择自定义时间取消
-		timeCancel(e){
-			this.isShow = false
+		selectDateFn(val) {
+			this.params = {...this.params,...val}
+			this.init();			
 		},
 		async init() {
 			this.getList();

+ 5 - 90
ghsApp/src/admin/statistics/incomeStat.vue

@@ -1,17 +1,8 @@
 <template>
 	<view class="ex-page">
 		<view class="top-bar">
-			<DorpdownSelect class="bar"
-				:menuObj="menuTimeObj"
-				:selectItemId.sync="selectTimeId"
-				:typeTime="true"
-				:typeSelect="1" top="0upx"
-				@selectSussess="selectSussess" />
-			<DorpdownSelect class="bar"
-				:menuObj.sync="menuObj"
-				:selectItemId.sync="shopId"
-				top="0"
-				@selectSussess="selectShopSussess" />
+			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+			<ShopSelect class="bar" top="0" @selectShopFn="selectShopFn" />
 		</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
 			<view class="space-view ex-table">
@@ -34,68 +25,26 @@
 				</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 { getStatProfit } from "@/api/statistics/index";
-import { list,selectShop } from "@/mixins";
+import { list } from "@/mixins";
 import DorpdownSelect from "@/components/module/shopSelect";
-import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
 import {mapActions, mapGetters} from "vuex";
 export default {
-	components: { SelectList, AppWrapperEmpty,DorpdownSelect,rangeDatePick },
-	mixins: [list,selectShop],
+	components: { SelectList, AppWrapperEmpty,DorpdownSelect },
+	mixins: [list],
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	data() {
 		return {
 			isShow:false,
 			customizationTime:'',
-			menuTimeObj:'',//时间分类-类型
-			menuShopObj:'',//门店分类-类型
 			selectTimeId:'',//选择时间id
 			shopId:'',//选择分店id
 			itemId:'',
-			selectListData: [
-				{
-					title: "时间",
-					key: "time",
-					default: "1",
-					data: [
-						{
-							name: "下午",
-							value: "1"
-						}
-					]
-				},
-				{
-					title: "全部",
-					key: "shopId",
-					default: "01",
-					data: [
-						{
-							name: "瑞景店",
-							value: "01"
-						},
-						{
-							name: "加州店",
-							value: "02"
-						}
-					]
-				}
-			],
 			nowTime: "",
 			showTimeDropdown: false,
 			nowShop: "",
@@ -140,44 +89,10 @@ export default {
 	onLoad(e) {
 		this.itemId = e.id;
 		this.params.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;
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
-		// 选择分店
-		selectShopSussess(val){
-			this.params.shopId = val.selectItem.id;
-			this.init();
-		},
-		//选择时间
-		selectSussess(val) {
-			this.params.selectTime = this.selectTimeId;
-			if(val.select=='自定义'){
-				this.selectTime();
-			}else{
-				this.init();
-			}
-		},
-		//选择时间-自定义时间
-		selectTime(){
-			this.customizationTime = [time,time],
-				this.isShow = true;
-		},
-		//选择自定义时间确定
-		timeChange(e){
-			this.isShow = false;
-			this.params.startTime = e[0]
-			this.params.endTime = e[1]
-			this.init();
-		},
-		//选择自定义时间取消
-		timeCancel(e){this.isShow = false;},
 		async init() {
 			this._list();
 		},

+ 12 - 68
ghsApp/src/admin/statistics/kdIncome.vue

@@ -2,17 +2,8 @@
 <view class="app-content">
 	<view class="ex-page">
 		<view class="top-bar">
-			<DateSelect class="bar"
-				:menuObj="menuTimeObj"
-				:selectItemId.sync="selectTimeId"
-				:typeTime="true"
-				:typeSelect="1" top="0upx"
-				@selectSussess="selectSussess" />
-			<DorpdownSelect class="bar"
-				:menuObj.sync="menuObj"
-				:selectItemId.sync="shopId"
-				top="0"
-				@selectSussess="selectShopSussess" />
+			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+			<ShopSelect class="bar" top="0" @selectShopFn="selectShopFn" />
 		</view>
 
 		<view  class="main-view">
@@ -38,18 +29,16 @@
 </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 { getStatKdProfile } from "@/api/statistics/index";
-import { list,selectShop } from "@/mixins";
-import DorpdownSelect from "@/components/module/shopSelect";
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
 import DateSelect from "@/components/module/dateSelect";
 import {mapActions, mapGetters} from "vuex";
 export default {
-	components: { SelectList, AppWrapperEmpty,DorpdownSelect,DateSelect},
-	mixins: [list,selectShop],
+	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect},
+	mixins: [list],
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	data() {
 		return {
@@ -60,34 +49,6 @@ export default {
 			selectTimeId:'',
 			shopId:'',
 			itemId:'',
-			selectListData: [
-				{
-					title: "时间",
-					key: "time",
-					default: "1",
-					data: [
-						{
-							name: "下午",
-							value: "1"
-						}
-					]
-				},
-				{
-					title: "全部",
-					key: "shopId",
-					default: "01",
-					data: [
-						{
-							name: "瑞景店",
-							value: "01"
-						},
-						{
-							name: "加州店",
-							value: "02"
-						}
-					]
-				}
-			],
 			nowTime: "",
 			showTimeDropdown: false,
 			nowShop: "",
@@ -133,37 +94,20 @@ export default {
 	onLoad(e) {
 		this.itemId = e.id;
 		this.params.itemId = e.id;
-		let dateDefaultOption = [];
-		let list = this.getDictionariesInfo.dateDefaultOption;
-		if(!this.$util.isEmpty(list)){
-			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;
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
-		// 选择分店
-		selectShopSussess(val){
-			this.params.shopId = val.selectItem.id;
+		//选择分店
+		selectShopFn(val){
+			this.params.shopId = val.id;
 			this.init();
 		},
 		//选择时间
-		selectSussess(val) {
-			this.params.selectTime = this.selectTimeId;
-			if(val.custom==1){
-				this.isShow = false;
-				this.params.startTime = val.start
-				this.params.endTime = val.end
-				this.init();
-			}else{
-				this.init();
-			}
+		selectDateFn(val) {
+			this.params = {...this.params,...val}
+			this.init();			
 		},
-		//选择自定义时间取消
-		timeCancel(e){this.isShow = false;},
 		async init() {
 			this._list();
 		},

+ 6 - 92
ghsApp/src/admin/statistics/mayPayStat.vue

@@ -1,17 +1,8 @@
 <template>
 	<view class="ex-page">
 		<view class="top-bar">
-			<DorpdownSelect class="bar"
-				:menuObj="menuTimeObj"
-				:selectItemId.sync="selectTimeId"
-				:typeTime="true"
-				:typeSelect="1" top="0upx"
-				@selectSussess="selectSussess" />
-			<DorpdownSelect class="bar"
-				:menuObj.sync="menuObj"
-				:selectItemId.sync="shopId"
-				top="0"
-				@selectSussess="selectShopSussess" />
+			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+			<ShopSelect class="bar" top="0" @selectShopFn="selectShopFn" />
 		</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
 			<view class="space-view ex-table">
@@ -31,68 +22,25 @@
 				</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 { getStatProfit } from "@/api/statistics/index";
-import { list,selectShop } from "@/mixins";
+import { list } from "@/mixins";
 import DorpdownSelect from "@/components/module/shopSelect";
-import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
 import {mapActions, mapGetters} from "vuex";
 export default {
-	components: { SelectList, AppWrapperEmpty,DorpdownSelect,rangeDatePick },
-	mixins: [list,selectShop],
+	components: { SelectList, AppWrapperEmpty,DorpdownSelect },
+	mixins: [list],
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	data() {
 		return {
 			isShow:false,
 			customizationTime:'',
-			menuTimeObj:'',//时间分类-类型
-			menuShopObj:'',//门店分类-类型
-			selectTimeId:'',//选择时间id
-			shopId:'',//选择分店id
+			shopId:'',
 			itemId:'',
-			selectListData: [
-				{
-					title: "时间",
-					key: "time",
-					default: "1",
-					data: [
-						{
-							name: "下午",
-							value: "1"
-						}
-					]
-				},
-				{
-					title: "全部",
-					key: "shopId",
-					default: "01",
-					data: [
-						{
-							name: "瑞景店",
-							value: "01"
-						},
-						{
-							name: "加州店",
-							value: "02"
-						}
-					]
-				}
-			],
 			nowTime: "",
 			showTimeDropdown: false,
 			nowShop: "",
@@ -137,44 +85,10 @@ export default {
 	onLoad(e) {
 		this.itemId = e.id;
 		this.params.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;
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
-		// 选择分店
-		selectShopSussess(val){
-			this.params.shopId = val.selectItem.id;
-			this.init();
-		},
-		//选择时间
-		selectSussess(val) {
-			this.params.selectTime = this.selectTimeId;
-			if(val.select=='自定义'){
-				this.selectTime();
-			}else{
-				this.init();
-			}
-		},
-		//选择时间-自定义时间
-		selectTime(){
-			this.customizationTime = [time,time],
-				this.isShow = true;
-		},
-		//选择自定义时间确定
-		timeChange(e){
-			this.isShow = false;
-			this.params.startTime = e[0]
-			this.params.endTime = e[1]
-			this.init();
-		},
-		//选择自定义时间取消
-		timeCancel(e){this.isShow = false;},
 		async init() {
 			this._list();
 		},

+ 12 - 73
ghsApp/src/admin/statistics/productSale.vue

@@ -8,17 +8,8 @@
     </view>
 
 	<view class="top-bar">
-		<DateSelect class="bar"
-			:menuObj="menuTimeObj"
-			:selectItemId.sync="selectTimeId"
-			:typeTime="true"
-			:typeSelect="1" top="0"
-			@selectSussess="selectSussess" />
-		<DorpdownSelect class="bar"
-			:menuObj.sync="menuObj"
-			:selectItemId.sync="shopId"
-			top="0"
-			@selectSussess="selectShopSussess" />
+		<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+		<ShopSelect class="bar" top="0" @selectShopFn="selectShopFn" />
 	</view>
 
 		<scroll-view scroll-y scroll-with-animation class="main-view">
@@ -41,57 +32,24 @@
 </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 { getStatItemProfit } from "@/api/statistics/index";
-import { list,selectShop } from "@/mixins";
-import DorpdownSelect from "@/components/module/shopSelect";
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
 import DateSelect from "@/components/module/dateSelect";
 import {mapActions, mapGetters} from "vuex";
 import AppSearchModule from "@/components/module/app-search";
 export default {
-	components: { SelectList, AppWrapperEmpty,DorpdownSelect,DateSelect,AppSearchModule},
-	mixins: [list,selectShop],
+	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect,AppSearchModule},
+	mixins: [list],
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	data() {
 		return {
 			isShow:false,
 			customizationTime:'',
-			menuTimeObj:'',
-			menuShopObj:'',
-			selectTimeId:'',
 			shopId:'',
 			itemId:'',
-			selectListData: [
-				{
-					title: "时间",
-					key: "time",
-					default: "1",
-					data: [
-						{
-							name: "下午",
-							value: "1"
-						}
-					]
-				},
-				{
-					title: "全部",
-					key: "shopId",
-					default: "01",
-					data: [
-						{
-							name: "瑞景店",
-							value: "01"
-						},
-						{
-							name: "加州店",
-							value: "02"
-						}
-					]
-				}
-			],
 			nowTime: "",
 			showTimeDropdown: false,
 			nowShop: "",
@@ -138,14 +96,6 @@ export default {
 	onLoad(e) {
 		this.itemId = e.id;
 		this.params.itemId = e.id;
-		let dateDefaultOption = [];
-		let list = this.getDictionariesInfo.dateDefaultOption;
-		if(!this.$util.isEmpty(list)){
-			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;
 	},
 	methods: {
@@ -170,26 +120,15 @@ export default {
 				that.profile = that.storageData
 			}
 		},
-		// 选择分店
-		selectShopSussess(val){
-			this.params.shopId = val.selectItem.id;
+		//选择分店
+		selectShopFn(val){
+			this.params.shopId = val.id;
 			this.init();
 		},
 		//选择时间
-		selectSussess(val) {
-			this.params.selectTime = this.selectTimeId;
-			if(val.custom==1){
-				this.isShow = false;
-				this.params.startTime = val.start
-				this.params.endTime = val.end
-				this.init();
-			}else{
-				this.init();
-			}
-		},
-		//选择自定义时间取消
-		timeCancel(e){
-			this.isShow = false
+		selectDateFn(val) {
+			this.params = {...this.params,...val}
+			this.init();			
 		},
 		async init() {
 			this.getStatList();

+ 16 - 85
ghsApp/src/admin/statistics/profit.vue

@@ -2,17 +2,8 @@
 <view class="app-content">
 	<view class="ex-page">
 		<view class="top-bar">
-			<DateSelect class="bar"
-				:menuObj="menuTimeObj"
-				:selectItemId.sync="selectTimeId"
-				:typeTime="true"
-				:typeSelect="1" top="0"
-				@selectSussess="selectSussess" />
-			<DorpdownSelect class="bar"
-				:menuObj.sync="menuObj"
-				:selectItemId.sync="shopId"
-				top="0"
-				@selectSussess="selectShopSussess" />
+			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+			<ShopSelect class="bar" top="0" @selectShopFn="selectShopFn" />
 		</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
 			<view class="space-view ex-table">
@@ -51,56 +42,25 @@
 </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 { getStatProfit } from "@/api/statistics/index";
-import { list,selectShop } from "@/mixins";
-import DorpdownSelect from "@/components/module/shopSelect";
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
 import DateSelect from "@/components/module/dateSelect";
 import {mapActions, mapGetters} from "vuex";
 export default {
-	components: { SelectList, AppWrapperEmpty,DorpdownSelect,DateSelect},
-	mixins: [list,selectShop],
-	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
+	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect},
+	mixins: [list],
+	computed: {		
+		...mapGetters(["getDictionariesInfo","getLoginInfo"])
+	},
 	data() {
 		return {
 			isShow:false,
 			customizationTime:'',
-			menuTimeObj:'',//时间分类-类型
-			menuShopObj:'',//门店分类-类型
-			selectTimeId:'',//选择时间id
-			shopId:'',//选择分店id
+			shopId:'',
 			itemId:'',
-			selectListData: [
-				{
-					title: "时间",
-					key: "time",
-					default: "1",
-					data: [
-						{
-							name: "下午",
-							value: "1"
-						}
-					]
-				},
-				{
-					title: "全部",
-					key: "shopId",
-					default: "01",
-					data: [
-						{
-							name: "瑞景店",
-							value: "01"
-						},
-						{
-							name: "加州店",
-							value: "02"
-						}
-					]
-				}
-			],
 			nowTime: "",
 			showTimeDropdown: false,
 			nowShop: "",
@@ -145,49 +105,20 @@ export default {
 	onLoad(e) {
 		this.itemId = e.id;
 		this.params.itemId = e.id;
-		let dateDefaultOption = [];
-		let list = this.getDictionariesInfo.dateDefaultOption;
-		if(!this.$util.isEmpty(list)){
-			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;
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
-		// 选择分店
-		selectShopSussess(val){
-			this.params.shopId = val.selectItem.id;
+		//选择分店
+		selectShopFn(val){
+			this.params.shopId = val.id;
 			this.init();
 		},
 		//选择时间
-		selectSussess(val) {
-			this.params.selectTime = this.selectTimeId;
-			if(val.custom==1){
-				this.isShow = false;
-				this.params.startTime = val.start
-				this.params.endTime = val.end
-				this.init();
-			}else{
-				this.init();
-			}
-		},
-		//选择时间-自定义时间
-		selectTime(){
-			this.customizationTime = [time,time],
-				this.isShow = true;
-		},
-		//选择自定义时间确定
-		timeChange(e){
-			this.isShow = false;
-			this.params.startTime = e[0]
-			this.params.endTime = e[1]
-			this.init();
+		selectDateFn(val) {
+			this.params = {...this.params,...val}
+			this.init();			
 		},
-		//选择自定义时间取消
-		timeCancel(e){this.isShow = false;},
 		async init() {
 			this._list();
 		},

+ 14 - 90
ghsApp/src/admin/statistics/sale.vue

@@ -1,17 +1,8 @@
 <template>
 	<view class="ex-page">
 		<view class="top-bar">
-			<DorpdownSelect class="bar"
-				:menuObj="menuTimeObj"
-				:selectItemId.sync="selectTimeId"
-				:typeTime="true"
-				:typeSelect="1" top="0upx"
-				@selectSussess="selectSussess" />
-			<DorpdownSelect class="bar"
-				:menuObj.sync="menuObj"
-				:selectItemId.sync="shopId"
-				top="0"
-				@selectSussess="selectShopSussess" />
+			<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
+			<ShopSelect class="bar" top="0" @selectShopFn="selectShopFn" />
 		</view>
 		<scroll-view scroll-y scroll-with-animation class="main-view">
 			<view class="space-view ex-table">
@@ -44,69 +35,26 @@
 				</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>
-      <!-- <kd-entrance></kd-entrance> -->
 	</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 { getStatProfit } from "@/api/statistics/index";
-import { list,selectShop } from "@/mixins";
-import DorpdownSelect from "@/components/module/shopSelect";
-import rangeDatePick from '@/components/pyh-rdtpicker/pyh-rdtpicker.vue';
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
+import DateSelect from "@/components/module/dateSelect";
 import {mapActions, mapGetters} from "vuex";
 export default {
-	components: { SelectList, AppWrapperEmpty,DorpdownSelect,rangeDatePick },
-	mixins: [list,selectShop],
+	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect },
+	mixins: [list],
 	computed: {		...mapGetters(["getDictionariesInfo","getLoginInfo"])	},
 	data() {
 		return {
 			isShow:false,
 			customizationTime:'',
-			menuTimeObj:'',//时间分类-类型
-			menuShopObj:'',//门店分类-类型
-			selectTimeId:'',//选择时间id
-			shopId:'',//选择分店id
+			shopId:'',
 			itemId:'',
-			selectListData: [
-				{
-					title: "时间",
-					key: "time",
-					default: "1",
-					data: [
-						{
-							name: "下午",
-							value: "1"
-						}
-					]
-				},
-				{
-					title: "全部",
-					key: "shopId",
-					default: "01",
-					data: [
-						{
-							name: "瑞景店",
-							value: "01"
-						},
-						{
-							name: "加州店",
-							value: "02"
-						}
-					]
-				}
-			],
 			nowTime: "",
 			showTimeDropdown: false,
 			nowShop: "",
@@ -151,44 +99,20 @@ export default {
 	onLoad(e) {
 		this.itemId = e.id;
 		this.params.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;
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
-		// 选择分店
-		selectShopSussess(val){
-			this.params.shopId = val.selectItem.id;
+		//选择分店
+		selectShopFn(val){
+			this.params.shopId = val.id;
 			this.init();
 		},
 		//选择时间
-		selectSussess(val) {
-			this.params.selectTime = this.selectTimeId;
-			if(val.select=='自定义'){
-				this.selectTime();
-			}else{
-				this.init();
-			}
-		},
-		//选择时间-自定义时间
-		selectTime(){
-			this.customizationTime = [time,time],
-				this.isShow = true;
-		},
-		//选择自定义时间确定
-		timeChange(e){
-			this.isShow = false;
-			this.params.startTime = e[0]
-			this.params.endTime = e[1]
-			this.init();
+		selectDateFn(val) {
+			this.params = {...this.params,...val}
+			this.init();			
 		},
-		//选择自定义时间取消
-		timeCancel(e){this.isShow = false;},
 		async init() {
 			this._list();
 		},

+ 18 - 6
ghsApp/src/components/module/dateSelect.vue

@@ -1,7 +1,7 @@
 <template>
     <view class="select-bg_bx">
         <view v-if="isShowTit" @click="switchCut" :class="['select-title',dropdownShow?'select_corlor':'']">
-            <text>{{currentDateName}}</text>
+            <text>{{defaultDateName}}</text>
             <text v-if="placeholder" style="color: #ccc;">{{placeholder}}</text>
             <i v-if="isShowMore" class="iconfont iconsanjiao_xia"></i>
         </view>
@@ -65,6 +65,10 @@ export default {
         placeholder: {
             type: String,
             default: ''
+        },
+        defaultShowName:{
+            type: String,
+            default: '今天'
         }
     },
     data(){
@@ -73,10 +77,18 @@ export default {
             showPicker: false,
             dropdownShow: false,
             selectItem:'',
-            currentDateName:'今天',
             startDate:'',
             endDate:'',
-            dateIndex:0
+            dateIndex:0,
+            defaultDateName:'今天'
+        }
+    },
+	watch:{
+		defaultShowName: {
+			handler(newVal) {
+                this.defaultDateName = newVal
+            },
+            immediate:true
         }
     },
     computed:{
@@ -112,8 +124,8 @@ export default {
                 return false
             }
             this.dropdownShow = false
-            this.currentDateName = '时间段'
-            this.$emit('selectDateFn',{selectTime:'custom',start:this.startDate,end:this.endDate})
+            this.defaultDateName = '时间段'
+            this.$emit('selectDateFn',{selectTime:'custom',startTime:this.startDate,endTime:this.endDate})
         },
         cancelPicker(){
             this.showPicker = false;
@@ -123,7 +135,7 @@ export default {
         },
         changeDateOption(val){
             this.dropdownShow = false;
-            this.currentDateName = val.name;
+            this.defaultDateName = val.name;
             this.$emit('selectDateFn',{selectTime:val.value})
         }
     }

+ 2 - 12
ghsApp/src/pagesStatistics/business.vue

@@ -5,13 +5,6 @@
 			<view class="business-info">
 				<view class="amount-view">
 					<text class="amount-label">账户余额</text>
-					<!--<view v-if="loginInfo.switchShop" class="amount-btn">-->
-						<!--<DorpdownSelect-->
-							<!--:menuObj.sync="menuObj"-->
-							<!--top="0upx"-->
-							<!--:selectItemId.sync="shopId"-->
-							<!--@selectSussess="selectSussess"></DorpdownSelect>-->
-					<!--</view>-->
 				</view>
 				<view class="price-view">
 					<text class="unit">¥</text>
@@ -143,18 +136,15 @@
 	</scroll-view>
   </view>
 </template>
-
 <script>
 import {getMainProfile} from '@/api/statistics'
-import DorpdownSelect from "@/components/module/shopSelect";
-import { selectShop } from '@/mixins'
 import {mapGetters} from "vuex";
 export default {
 	name:'Business',
 	components:{
-		DorpdownSelect
+		
 	},
-	mixins:[selectShop],
+	mixins:[],
 	computed:{
 		...mapGetters(["getMyShopInfo"]),
 	},

+ 1 - 3
ghsApp/src/pagesStorehouse/stockWarn/manage.vue

@@ -32,14 +32,12 @@ import productMins from "@/mixins/product";
 import productContraposeMins from "@/mixins/productContrapose";
 import { selectShop } from "@/mixins";
 import { mapGetters } from "vuex";
-import DorpdownSelect from "@/components/module/shopSelect";
 export default {
 	name: "stock_manage",
 	components: {
 		AppSearchModule,
 		AppWrapperEmpty,
-		CommodityStock,
-		DorpdownSelect
+		CommodityStock
 	},
 	mixins: [productMins, selectShop,productContraposeMins],
 	data() {