Ver código fonte

渔家乐特价船上架限制,统计年度选择框修改

17755135699 11 meses atrás
pai
commit
ae685e5c07

+ 54 - 38
pagesHouse/HotelMerchandise/index.vue

@@ -1,5 +1,6 @@
 <template>
-	<view class="pages" :style="{'min-height':h+'px','padding-top':(mt)+'px','padding-botom':(Selected?100:0)+'px','box-sizing':(Selected?'content-box':'border-box')}">
+	<view class="pages"
+		:style="{'min-height':h+'px','padding-top':(mt)+'px','padding-botom':(Selected?100:0)+'px','box-sizing':(Selected?'content-box':'border-box')}">
 		<c-nav-bar title="商品管理"></c-nav-bar>
 		<view class="tb">
 			<view class="tabs">
@@ -38,35 +39,35 @@
 						<view class="pricequjian">
 							<template v-if="merchantType==10">
 								<!-- 渔家乐 -->
-							<view class="jiage" v-for="(item, index) in list1" :key="index"
-								@click="clickareaShow(item, index)">
-								<view class="contentpeice">
-									<view class="title" :class="{'Doublactive': areaShowIndex == index}">
-										{{item.name}}
-									</view>
-									<view class="image" v-if="areaShowIndex == index">
-										<image
-											src="https://i.ringzle.com/file/20240316/16dd69efb40242de83da8207539ec73e.png"
-											mode=""></image>
+								<view class="jiage" v-for="(item, index) in list1" :key="index"
+									@click="clickareaShow(item, index)">
+									<view class="contentpeice">
+										<view class="title" :class="{'Doublactive': areaShowIndex == index}">
+											{{item.name}}
+										</view>
+										<view class="image" v-if="areaShowIndex == index">
+											<image
+												src="https://i.ringzle.com/file/20240316/16dd69efb40242de83da8207539ec73e.png"
+												mode=""></image>
+										</view>
 									</view>
 								</view>
-							</view>
 							</template>
 							<template v-else>
 								<!-- 餐饮 -->
-							<view class="jiage" v-for="(item, index) in list" :key="index"
-								@click="clickareaShow(item, index)">
-								<view class="contentpeice">
-									<view class="title" :class="{'Doublactive': areaShowIndex == index}">
-										{{item.name}}
-									</view>
-									<view class="image" v-if="areaShowIndex == index">
-										<image
-											src="https://i.ringzle.com/file/20240316/16dd69efb40242de83da8207539ec73e.png"
-											mode=""></image>
+								<view class="jiage" v-for="(item, index) in list" :key="index"
+									@click="clickareaShow(item, index)">
+									<view class="contentpeice">
+										<view class="title" :class="{'Doublactive': areaShowIndex == index}">
+											{{item.name}}
+										</view>
+										<view class="image" v-if="areaShowIndex == index">
+											<image
+												src="https://i.ringzle.com/file/20240316/16dd69efb40242de83da8207539ec73e.png"
+												mode=""></image>
+										</view>
 									</view>
 								</view>
-							</view>
 							</template>
 						</view>
 					</view>
@@ -272,7 +273,7 @@
 				Selected: false,
 				showPricing: false,
 				areaShow: false,
-				areaval:'上架时间',
+				areaval: '上架时间',
 				//餐饮
 				list: [{
 						name: '创建时间',
@@ -311,8 +312,7 @@
 					// },
 				],
 				//渔家乐
-				list1: [
-					{
+				list1: [{
 						name: '上架时间',
 						key: 'updateDate',
 						value: 1
@@ -334,7 +334,7 @@
 					// }
 				],
 				areaShowIndex: null,
-				merchantType:uni.getStorageSync('merchantType'),
+				merchantType: uni.getStorageSync('merchantType'),
 				fromData: {
 					merchantId: uni.getStorageSync('merchantId'), //商户id
 					limit: 99,
@@ -342,7 +342,10 @@
 					sortType: '', //选择条件:1创建时间 2销量从高到低 3价格从高到低 4价格从低到高
 					status: 0, //状态:0上架1下架
 				},
-				typecfg:{1:'特价船',2:'包船'}
+				typecfg: {
+					1: '特价船',
+					2: '包船'
+				}
 			}
 		},
 		onLoad(option) {
@@ -456,7 +459,7 @@
 						// 	id: namesArray,
 						// 	status: this.fromData.status,
 						// };
-						this.$api.post('/scenic/goods/batchUpDownFrame', postdata).then(res => {
+						this.$api.post('/scenic/api/goods/batchUpDownFrame', postdata).then(res => {
 							this.$refs.uToast.show({
 								type: 'success',
 								title: '',
@@ -512,7 +515,7 @@
 						let namesArray = this.selectedTags.map(obj => obj.id);
 						console.log('111111111111111111', namesArray)
 						//status: this.fromData.status,
-						this.$api.del('/scenic/goods', namesArray).then(res => {
+						this.$api.del('/scenic/api/goods', namesArray).then(res => {
 							this.$refs.uToast.show({
 								type: 'success',
 								title: '',
@@ -553,7 +556,7 @@
 					let postdata = [this.lsdata.id];
 					//status: this.fromData.status,
 					console.log('postdata', postdata)
-					this.$api.del('/scenic/goods', postdata).then(res => {
+					this.$api.del('/scenic/api/goods', postdata).then(res => {
 						this.$refs.uToast.show({
 							type: 'success',
 							title: '',
@@ -615,7 +618,7 @@
 							status: this.fromData.status,
 						};
 						console.log('postdata', postdata)
-						this.$api.put('/scenic/goods', postdata).then(res => {
+						this.$api.put('/scenic/api/goods', postdata).then(res => {
 							this.$refs.uToast.show({
 								type: 'success',
 								title: '',
@@ -648,9 +651,21 @@
 			},
 			opengaijia() {},
 
-
+			GetDateStr(AddCount) {
+				var dd = new Date();
+				dd.setDate(dd.getDate() + AddCount); //获取AddDayCount天后的日期
+				var y = dd.getFullYear();
+				var m = dd.getMonth() + 1; //获取当前月份的日期
+				var d = dd.getDate();
+				m = m > 9 ? m : "0" + m;
+				d = d > 9 ? d : "0" + d;
+				return y + "-" + m + "-" + d;
+			},
 			xiajia1(e, i) {
-				console.log('111111111111111111', e, i)
+				console.log(e)
+				if (this.GetDateStr(2) != e.playDate && !e.status) {
+					return this.$showToast("日期已过期");
+				}
 				this.lsdata = e;
 				this.xiajiashow1 = true;
 			},
@@ -683,7 +698,7 @@
 						id: this.lsdata.id,
 						status: this.fromData.status == 1 ? 0 : 1,
 					};
-					this.$api.put('/scenic/goods', postdata).then(res => {
+					this.$api.put('/scenic/api/goods', postdata).then(res => {
 						this.$refs.uToast.show({
 							type: 'success',
 							title: '',
@@ -713,7 +728,7 @@
 			},
 			yujialedata() {
 				this.$api.get('/scenic/api/goods/page', this.fromData).then(res => {
-					this.roomType = res.data.data.list.filter(d=>d.goodsType!=3);
+					this.roomType = res.data.data.list.filter(d => d.goodsType != 3);
 					this.mytotal = res.data.data.total;
 				})
 			},
@@ -728,7 +743,7 @@
 			clickareaShow(e, i) {
 				this.areaShowIndex = i;
 				this.areaShow = false;
-				this.areaval=e.name;
+				this.areaval = e.name;
 				// this.fromData.sortType = e.id;
 				// this.fromData.page = 1;
 				//this.getRepast();
@@ -1312,7 +1327,8 @@
 					height: 100%;
 					border-radius: 16rpx;
 				}
-				.rl_type{
+
+				.rl_type {
 					width: 80rpx;
 					height: 34rpx;
 					background: #FEB000;

+ 1 - 1
pagesHouse/home/bill.vue

@@ -106,7 +106,7 @@
 			},
 			//渔家乐
 			getList() {
-				this.$api.get('/scenic/order/tradeBills', {
+				this.$api.get('/scenic/api/order/tradeBills', {
 					startDate: this.date,
 					endDate: '',
 					dateType: '1',

+ 6 - 13
pagesHouse/home/tj.vue

@@ -1,11 +1,11 @@
 <template>
-	<view class="page tt" :style="{'min-height':(h-th)+'px','padding-top':mt+'px'}">
+	<view  :style="{'min-height':(h-th)+'px','padding-top':mt+'px'}" :class="type==2?'year page tt':'page tt'">
 		<c-nav-bar title="数据统计"></c-nav-bar>
 		<view class="tabs">
 			<text :class="type==1?'on':''" @click="type=1">月账单</text>
 			<text :class="type==2?'on':''" @click="type=2">年账单</text>
 		</view>
-		<view class="content">
+		<view class="content ">
 			<view class="time" @click="show=true">
 				<u-icon name="calendar" :label="dateStr" labelPos="right" labelColor="#666" color="#666" space="7px"
 					size="25px"></u-icon>
@@ -154,7 +154,7 @@
 			},
 			//渔家乐
 			getList() {
-				this.$api.post('/scenic/order/dataStatistics', {
+				this.$api.post('/scenic/api/order/dataStatistics', {
 					dateTime: this.date,
 					dateType: this.type + '',
 					merchantId: uni.getStorageSync('merchantId')
@@ -269,16 +269,9 @@
 	.u-transition {
 		z-index: 99999998 !important;
 	}
-
-	// .yearPicker {
-	// 	.picker-items {
-
-	// 		.picker-slot:nth-child(2),
-	// 		.picker-slot:nth-child(3) {
-	// 			display: none;
-	// 		}
-	// 	}
-	// }
+	.year .u-picker__view__column:last-child {
+		display:none;
+	}
 </style>
 <style scoped lang="less">
 	/deep/.visibleItemCount {