Browse Source

退款规则。首页条登录、核销记录

baijunde 1 year ago
parent
commit
ef9d7a9a62

+ 1 - 0
common/service/config.service.js

@@ -6,6 +6,7 @@ if (process.env.NODE_ENV == 'development') {
 	// BASE_URL = 'http://192.168.0.36:8080/jeecg-boot' // 开发环境
     // BASE_URL = 'http://192.168.0.52:8081/jeecg-boot' // 开发环境
 		// BASE_URL = 'http://192.168.0.42:8080/jeecg-boot' // 开发环境
+		 // BASE_URL = 'http://192.168.0.103:8080/jeecg-boot' // 开发环境
 
 } else {
 	BASE_URL = 'https://test.baoxianzhanggui.com/locallive-java' // 测试环境

+ 169 - 145
components/product/refund.vue

@@ -1,11 +1,11 @@
 <template>
-  <view class="popup" @tap="closePopup">
-    <view class="model" @tap.stop>
-      <view class="title">
-        <text>退款规则</text>
+	<view class="popup" @tap="closePopup">
+		<view class="model" @tap.stop>
+			<view class="title">
+				<text>退款规则</text>
 				<image src="/static/index/cut.png" mode="" @tap="closePopup"></image>
-      </view>
-      <view class="popup-body">
+			</view>
+			<view class="popup-body">
 				<view class="tag">
 					<view class="tips">
 						退款标签
@@ -26,163 +26,187 @@
 						<image src="/static/product/round.png" mode="" v-else></image>
 					</view>
 				</view>
-      </view>
-      <view class="foot">
-        <view class="cancel" @tap="closePopup">取消</view>
-        <view class="sub" @tap="confirm">确定</view>
-      </view>
-    </view>
-  </view>
+			</view>
+			<view class="foot">
+				<view class="cancel" @tap="closePopup">取消</view>
+				<view class="sub" @tap="confirm">确定</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-export default {
-  data() {
-    return {
-      tagList:[
-				{
-					name:'随时退',
-					refundLabel:1
-				},
-				{
-					name:'过期自动退',
-					refundLabel:2
-				}
-			],
-			tagCurrent:null,
-			verifyList:[
-				{
-					name:'需要确认',
-					refundConfirm:1
-				},
-				{
-					name:'无需确认',
-					refundConfirm:0
+	export default {
+		props: {
+			Confirm: {
+				type: String,
+				default: ''
+			},
+			Label:{
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				tagList: [{
+						name: '随时退',
+						refundLabel: 1
+					},
+					{
+						name: '过期自动退',
+						refundLabel: 2
+					}
+				],
+				tagCurrent: null,
+				verifyList: [{
+						name: '需要确认',
+						refundConfirm: 1
+					},
+					{
+						name: '无需确认',
+						refundConfirm: 0
+					}
+				],
+				verifyCurrent: null,
+				refundLabel: [],
+				refundConfirm: [],
+
+			};
+		},
+		methods: {
+			closePopup() {
+				this.$emit('close');
+			},
+			confirm() {
+				if (this.refundLabel.length == 0 || this.refundConfirm.length == 0) {
+					uni.showToast({
+						title: '请选择退款规则',
+						icon: 'none'
+					});
+				} else {
+					this.$emit('confirm', {
+						refundLabel: this.refundLabel,
+						refundConfirm: this.refundConfirm
+					});
+					this.closePopup();
 				}
-			],
-			verifyCurrent:null,
-			refundLabel:[],
-			refundConfirm:[],
-			
-    };
-  },
-  methods: {
-    closePopup() {
-      this.$emit('close');
-    },
-    confirm() {
-			if(this.refundLabel.length ==0 || this.refundConfirm.length ==0 ){
-				console.log('5555')
-				uni.showToast({
-					title: '请选择退款规则',
-					icon:'none'
-				});
-			}else{
-				this.$emit('confirm', {
-				  refundLabel: this.refundLabel,
-				  refundConfirm: this.refundConfirm
-				});
-				this.closePopup();
+
+			},
+			selectTag(item, index) {
+				this.tagCurrent = index
+				this.refundLabel = item
+			},
+			selectverify(item, index) {
+				this.verifyCurrent = index
+				this.refundConfirm = item
 			}
-     
-    },
-		selectTag(item,index){
-			this.tagCurrent = index
-			this.refundLabel = item
 		},
-		selectverify(item,index){
-			this.verifyCurrent = index
-			this.refundConfirm = item
+		mounted() {
+			setTimeout(()=>{
+				this.tagCurrent = this.Label
+					this.verifyCurrent = this.Confirm 
+					this.$forceUpdate()
+			},100)
+		
 		}
-  }
-};
+	};
 </script>
 
 <style lang="scss" scoped>
-.popup {
-  width: 100vw;
-  height: 100vh;
-  position: fixed;
-  top: 0;
-  left: 0;
-  background: rgba(0, 0, 0, 0.4);
-  display: flex;
-//   align-items: end;
-align-items: flex-end;
-  z-index: 99;
-	.model{
-		width: 100%;
-		background-color: #fff;
-		border-radius: 20rpx 20rpx 0rpx 0rpx;
-		padding: 0rpx 24rpx;
-		padding-bottom: 20rpx;
-		.title {
+	.popup {
+		width: 100vw;
+		height: 100vh;
+		position: fixed;
+		top: 0;
+		left: 0;
+		background: rgba(0, 0, 0, 0.4);
+		display: flex;
+		//   align-items: end;
+		align-items: flex-end;
+		z-index: 99;
+
+		.model {
 			width: 100%;
-			height: 86rpx;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			position: relative;
-			border-bottom: 1px solid #eeeeee;
-			margin-bottom: 24rpx;
-		
-			image {
-				width: 40rpx;
-				height: 40rpx;
-				position: absolute;
-				right: 0px;
-			}
-		}
-		.popup-body{
-			.tag{
+			background-color: #fff;
+			border-radius: 20rpx 20rpx 0rpx 0rpx;
+			padding: 0rpx 24rpx;
+			padding-bottom: 20rpx;
+
+			.title {
+				width: 100%;
+				height: 86rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				position: relative;
+				border-bottom: 1px solid #eeeeee;
 				margin-bottom: 24rpx;
-				.tips{
-					font-size: 28rpx;
+
+				image {
+					width: 40rpx;
+					height: 40rpx;
+					position: absolute;
+					right: 0px;
 				}
-				.item{
-					width: 100%;
-					height: 70rpx;
-					font-size: 26rpx;
-					border-bottom: 1px solid #EEEEEE;
-					display: flex;
-					align-items: center;
-					justify-content: space-between;
-					image{
-						width: 28rpx;
-						height: 28rpx;
+			}
+
+			.popup-body {
+				.tag {
+					margin-bottom: 24rpx;
+
+					.tips {
+						font-size: 28rpx;
+					}
+
+					.item {
+						width: 100%;
+						height: 70rpx;
+						font-size: 26rpx;
+						border-bottom: 1px solid #EEEEEE;
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+
+						image {
+							width: 28rpx;
+							height: 28rpx;
+						}
 					}
 				}
 			}
-		}
-		.foot{
-			display: flex;
-			justify-content: space-between;
-			border-top: 1px solid #eeeeee;
-			padding-top: 16rpx;
-			.cancel{
-				width: 324rpx;
-				height: 76rpx;
-				border-radius: 54rpx;
-				border: 1px solid #CCCCCC;
-				font-size: 28rpx;
-				color: #999999;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-			}
-			.sub{
-				width: 324rpx;
-				height: 76rpx;
-				background: linear-gradient( 90deg, #77B6FF 0%, #449AFF 100%);
-				border-radius: 54rpx;
-				border: 1px solid #CCCCCC;
-				font-size: 28rpx;
-				color: #ffffff;
+
+			.foot {
 				display: flex;
-				justify-content: center;
-				align-items: center;
+				justify-content: space-between;
+				border-top: 1px solid #eeeeee;
+				padding-top: 16rpx;
+
+				.cancel {
+					width: 324rpx;
+					height: 76rpx;
+					border-radius: 54rpx;
+					border: 1px solid #CCCCCC;
+					font-size: 28rpx;
+					color: #999999;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+				}
+
+				.sub {
+					width: 324rpx;
+					height: 76rpx;
+					background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
+					border-radius: 54rpx;
+					border: 1px solid #CCCCCC;
+					font-size: 28rpx;
+					color: #ffffff;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+				}
 			}
 		}
 	}
-}
 </style>

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "掌柜生活商户版",
     "appid" : "__UNI__E0EA6E1",
     "description" : "",
-    "versionName" : "1.0.1",
-    "versionCode" : 101,
+    "versionName" : "1.0.4",
+    "versionCode" : 104,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 3 - 3
pages/index/index.vue

@@ -116,9 +116,9 @@
 				})
 			},
 			scanRecordaa() {
-				uni.navigateTo({
-					url: '/pages/login/login'
-				})
+				// uni.navigateTo({
+				// 	url: '/pages/login/login'
+				// })
 			},
 			gettodayData() {
 				this.$http.get("/merchant/app/home/todayData?merchantId=" + this.merchantId, {}).then(res => {

+ 29 - 14
pages/product/creatProduct.vue

@@ -171,7 +171,7 @@
 					</view>
 					<view class="item">
 						<view class="label">
-							退款规则
+							退款规则<span>*</span>
 						</view>
 						<view class="picker set" @click="tabIndex==0?isRefund = true:''">
 							<view class="" v-if="showRule" style="color: #333333;">
@@ -212,7 +212,7 @@
 			</view>
 		</view>
 		<rangTime ref="rangTime" :mode="mode" @onSubmit="onEndTimeChange" />
-		<refund v-show="isRefund" @confirm="saveFound" @close="cutRule" />
+		<refund v-show="isRefund" :Confirm="form.refundConfirm" :Label="form.refundLabel"  @confirm="saveFound" @close="cutRule" />
 		<view class="popup" v-if="isSelectType">
 			<view class="model">
 				<view class="title">
@@ -391,11 +391,11 @@ export default {
 		},
 		// 跳转至组合商品页
 		goGroup() {
-			if(this.tabIndex==0){
+			// if(this.tabIndex==0){
 				uni.navigateTo({
 					url: '/pages/product/group'
 				})
-			}
+			// }
 
 		},
 		//返回
@@ -415,11 +415,9 @@ export default {
 		},
 		//跳转至可用时间
 		setUsable() {
-			if(this.tabIndex==0){
 				uni.navigateTo({
 					url: '/pages/product/usable'
 				})
-			}
 
 		},
 		// 保存退款规则
@@ -535,6 +533,7 @@ export default {
 		},
 		//提交审核
 		submit() {
+			console.log(this.form)
 			this.makeChecked ? this.form.preBook = 1 : this.form.preBook = 0
 			if (!this.form.saleStartDate) {
 				uni.showToast({
@@ -554,7 +553,15 @@ export default {
 					icon: 'none'
 				});
 				return
-			} else {
+			}
+			else if (this.form.refundConfirmName == '' ||this.form.refundLabelName=='' ) {
+				uni.showToast({
+					title: '请选择退款标签',
+					icon: 'none'
+				});
+				return
+			}
+			 else {
 				if (this.productId == '') {
 					this.$http.post("/app/product/add", this.form).then(res => {
 						if (res.data.code == 200) {
@@ -562,14 +569,21 @@ export default {
 								title: '添加成功',
 								icon: 'none'
 							});
+							this.back()
+							uni.removeStorage({
+								key: 'smdate',
+							});
+							uni.removeStorage({
+								key: 'group',
+							});
+						}else{
+							uni.showToast({
+								title: res.message,
+								icon: 'none'
+							});
 						}
-						uni.removeStorage({
-							key: 'smdate',
-						});
-						uni.removeStorage({
-							key: 'group',
-						});
-						this.back()
+						
+						
 					})
 				} else {
 					this.form.productId = this.productId
@@ -624,6 +638,7 @@ export default {
 					}
 					res.data.result.preBook == 0 ? this.makeChecked = false : this.makeChecked = true
 					this.showRule = res.data.result.refundLabelName + '·' + res.data.result.refundConfirmName
+					console.log(this.showRule)
 					uni.setStorage({
 						key: 'group',
 						data: res.data.result.productGroups

+ 526 - 482
pages/product/creatStandard.vue

@@ -32,12 +32,11 @@
 						<view class="repertory">售卖时间:{{ item.saleStartDate }} - {{ item.saleEndDate }}</view>
 						<view class="price">
 							<span style="font-size: 22rpx;margin: 0px;">¥</span>{{ item.soldPrice }}
-							<span
-								style="color:#999 ;font-size: 22rpx; text-decoration: line-through;">¥{{ item.price }}</span>
+							<span style="color:#999 ;font-size: 22rpx; text-decoration: line-through;">¥{{ item.price }}</span>
 						</view>
 					</view>
 					<view class="ticket" v-if="item.isRights == 1">
-							<image src="/static/product/ticket.png" mode=""></image>
+						<image src="/static/product/ticket.png" mode=""></image>
 					</view>
 					<view class="tag" @click.stop="select(item)">
 						<!-- <span>组合套餐</span>
@@ -63,491 +62,494 @@
 </template>
 
 <script>
-import configService from '../../common/service/config.service'
-export default {
-	data() {
-		return {
-			isManage: false,
-			currentIndex: 0,
-			productStatus: 0, //商品状态,默认1售卖中,0未上架,2审核中,3未通过
-			isAll: false,
-			canBeDelete: true,
-			productName: '',
-			productList: [],
-			merchantId: '',
-			tabIndex: 1
-		}
-	},
-	methods: {
-		//返回
-		back() {
-			uni.navigateTo({
-				url: '/pages/product/index'
-			})
-		},
-		handleClear() {
-			this.getProductList()
-			// 这里可以添加其他逻辑
+	import configService from '../../common/service/config.service'
+	export default {
+		data() {
+			return {
+				isManage: false,
+				currentIndex: 0,
+				productStatus: 0, //商品状态,默认1售卖中,0未上架,2审核中,3未通过
+				isAll: false,
+				canBeDelete: true,
+				productName: '',
+				productList: [],
+				merchantId: '',
+				tabIndex: 1
+			}
 		},
-		//切换分类
-		selectType(item, index) {
-			if (!this.isManage) {
-				this.currentIndex = index
-				this.productStatus = item.code
+		methods: {
+			//返回
+			back() {
+				uni.navigateTo({
+					url: '/pages/product/index'
+				})
+			},
+			handleClear() {
 				this.getProductList()
-			}
+				// 这里可以添加其他逻辑
+			},
+			//切换分类
+			selectType(item, index) {
+				if (!this.isManage) {
+					this.currentIndex = index
+					this.productStatus = item.code
+					this.getProductList()
+				}
 
-		},
-		add() {
-			if (this.productList.filter(e => e.select).map(e => e.productId).length > 0) {
-				let ids = this.productList.filter(e => e.select).map(e => e.productId).join(',')
+			},
+			add() {
+				if (this.productList.filter(e => e.select).map(e => e.productId).length > 0) {
+					let ids = this.productList.filter(e => e.select).map(e => e.productId).join(',')
+
+					this.$http.get("/app/product/addPurveyorProduct?ids=" + ids + '&merchantId=' + this.merchantId)
+						.then(res => {
+							if (res.data.code == 200) {
+								this.$tip.success(res.data.message || '添加成功');
+								this.back()
+							} else {
+								this.$tip.error(res.data.message);
+							}
+						})
+				} else {
+					this.$tip.alert('请选择品牌标品');
 
-				this.$http.get("/app/product/addPurveyorProduct?ids=" + ids + '&merchantId=' + this.merchantId)
+				}
+			},
+			select(item) {
+				item.select = !item.select
+			},
+			//全选
+			allSelect() {
+				if (this.isAll) {
+					this.isAll = false
+					this.productList.forEach(item => {
+						item.select = false
+					})
+				} else {
+					this.isAll = true
+					this.productList.forEach(item => {
+						item.select = true
+					})
+				}
+			},
+			getProductList() {
+				this.$http.get("/app/product/purveyor/list?merchantId=" + this.merchantId + "&productStatus=" + this
+						.productStatus +
+						'&productName=' + this.productName, )
 					.then(res => {
 						if (res.data.code == 200) {
-							this.$tip.success(res.data.message || '添加成功');
-							this.back()
-						}
-						else {
-							this.$tip.error(res.data.message);
+							res.data.result.records.forEach((item) => {
+								item.select = false;
+								item.saleEndDate = item.saleEndDate.includes('00:00:00') ? item.saleEndDate.slice(0, 10) : item
+									.saleEndDate
+								item.saleStartDate = item.saleStartDate.includes('00:00:00') ? item.saleStartDate.slice(0, 10) :
+									item.saleStartDate
+								// item.productImage = configService.apiUrl + '/' + item.productImage
+							})
+							this.productList = res.data.result.records
 						}
 					})
-			}
-			else{
-				this.$tip.alert('请选择品牌标品');
+			},
 
-			}
-		},
-		select(item) {
-			item.select = !item.select
-		},
-		//全选
-		allSelect() {
-			if (this.isAll) {
-				this.isAll = false
-				this.productList.forEach(item => {
-					item.select = false
-				})
-			} else {
-				this.isAll = true
-				this.productList.forEach(item => {
-					item.select = true
-				})
-			}
-		},
-		getProductList() {
-			this.$http.get("/app/product/purveyor/list?merchantId=" + this.merchantId + "&productStatus=" + this.productStatus +
-				'&productName=' + this.productName,)
-				.then(res => {
-					if (res.data.code == 200) {
-						res.data.result.records.forEach((item) => {
-							item.select = false;
-							item.saleEndDate = item.saleEndDate.includes('00:00:00') ? item.saleEndDate.slice(0, 10) : item.saleEndDate
-							item.saleStartDate = item.saleStartDate.includes('00:00:00') ? item.saleStartDate.slice(0, 10) : item.saleStartDate
-							// item.productImage = configService.apiUrl + '/' + item.productImage
-						})
-						this.productList = res.data.result.records
-					}
-				})
 		},
+		onShow() {
+			let that = this
+			uni.getStorage({
+				key: 'login_user_info',
+				success: function(res) {
+					that.merchantId = res.data.merchantId
+					that.getProductList()
+				}
+			})
+			uni.removeStorage({
+				key: 'smdate',
+			});
+			uni.removeStorage({
+				key: 'group',
+			});
 
-	},
-	onShow() {
-		let that = this
-		uni.getStorage({
-			key: 'login_user_info',
-			success: function (res) {
-				that.merchantId = res.data.merchantId
-			}
-		})
-		uni.removeStorage({
-			key: 'smdate',
-		});
-		uni.removeStorage({
-			key: 'group',
-		});
-		this.getProductList()
+		}
+		// async onShow() {
+		// 	let that = this
+		// 	uni.getStorage({
+		// 		key: 'login_user_info',
+		// 		success: function(res) {
+		// 			that.merchantId = res.data.merchantId
+		// 		}
+		// 	})
+		// 	let res = await this.$http.get(
+		// 		"/app/product/purveyor/list?merchantId=" + this.merchantId + "&productStatus=" + this.productStatus +
+		// 		'&productName=' + this.productName)
+		// 	console.log(res)
+		// 	if (res.data.code == 200) {
+
+		// 		res.data.result.records.forEach((item) => {
+		// 			item.select = false;
+		// 			item.saleEndDate = item.saleEndDate.includes('00:00:00') ? item.saleEndDate.slice(0, 10) : item
+		// 				.saleEndDate
+		// 			item.saleStartDate = item.saleStartDate.includes('00:00:00') ? item.saleStartDate.slice(0, 10) : item
+		// 				.saleStartDate
+		// 			// item.productImage = configService.apiUrl + '/' + item.productImage
+		// 		})
+		// 		this.productList = res.data.result.records
+		// 		console.log(this.productList.length)
+
+		// 	}
+		// 	// await	this.getProductList()
+		// 	// console.log(this.productList.length)
+		// 	 uni.showToast({
+		// 		icon: 'error',
+		// 		title: '' + this.productList.length
+		// 	})
+
+		// 	// uni.removeStorage({
+		// 	// 	key: 'smdate',
+		// 	// });
+		// 	// uni.removeStorage({
+		// 	// 	key: 'group',
+		// 	// });
+
+		// }
 	}
-}
 </script>
 
 <style lang="scss" scoped>
-.product {
-	width: 100%;
-	height: 100vh;
-	display: flex;
-	flex-direction: column;
-	justify-content: space-between;
-	background: #F7F8FC;
-
-	.top {
-		width: 100%;
-		height: var(--status-bar-height);
-		background: linear-gradient(87deg, #FFFFFF 0%, #A3CDFF 100%), linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
-	}
-
-	.head {
+	.product {
 		width: 100%;
-		background: #ffffff;
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-between;
+		background: #F7F8FC;
 
-		.handle {
-			height: 112rpx;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			padding: 0px 24rpx;
-			position: relative;
+		.top {
+			width: 100%;
+			height: var(--status-bar-height);
 			background: linear-gradient(87deg, #FFFFFF 0%, #A3CDFF 100%), linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
+		}
 
-			.head_left {
-				font-size: 40rpx;
-			}
-
-			.center {
-				position: absolute;
-				left: 50%;
-				top: 50%;
-				transform: translate(-50%, -50%);
-				font-size: 36rpx;
-				font-weight: 600;
-			}
+		.head {
+			width: 100%;
+			background: #ffffff;
 
-			.head_right {
+			.handle {
+				height: 112rpx;
 				display: flex;
 				justify-content: space-between;
 				align-items: center;
+				padding: 0px 24rpx;
+				position: relative;
+				background: linear-gradient(87deg, #FFFFFF 0%, #A3CDFF 100%), linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
 
-				span {
-					width: 40rpx;
-					height: 40rpx;
-					display: flex;
-					justify-content: center;
-					align-items: center;
+				.head_left {
+					font-size: 40rpx;
 				}
 
-				.manage {
-					// width: 150rpx;
-					margin-left: 28rpx;
+				.center {
+					position: absolute;
+					left: 50%;
+					top: 50%;
+					transform: translate(-50%, -50%);
+					font-size: 36rpx;
+					font-weight: 600;
 				}
-			}
-		}
 
-		.search {
-			width: 93%;
-			height: 56rpx;
-			background: #F7F8FC;
-			border-radius: 12rpx;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			margin: 24rpx auto;
-			font-size: 26rpx;
-			padding: 13rpx 20rpx;
-
-			span {
-				margin-right: 15rpx;
+				.head_right {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
 
-			}
+					span {
+						width: 40rpx;
+						height: 40rpx;
+						display: flex;
+						justify-content: center;
+						align-items: center;
+					}
 
-			input {
-				flex: 1;
-				font-size: 26rpx;
+					.manage {
+						// width: 150rpx;
+						margin-left: 28rpx;
+					}
+				}
 			}
 
-			.search_btn {
-				width: 72rpx;
-				color: #333333;
+			.search {
+				width: 93%;
+				height: 56rpx;
+				background: #F7F8FC;
+				border-radius: 12rpx;
 				display: flex;
 				align-items: center;
 				justify-content: space-between;
+				margin: 24rpx auto;
+				font-size: 26rpx;
+				padding: 13rpx 20rpx;
 
 				span {
-					display: block;
-					width: 1px;
-					height: 26rpx;
-					background-color: #eeeeee;
+					margin-right: 15rpx;
+
 				}
-			}
-		}
 
-		.type {
-			display: flex;
-			justify-content: space-between;
-			background-color: #fff;
-			padding: 8px 24rpx 16rpx;
+				input {
+					flex: 1;
+					font-size: 26rpx;
+				}
 
-			.type_item {
-				height: 54rpx;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				font-size: 26rpx;
-				color: #888888;
-				position: relative;
-				padding: 8rpx 12rpx;
-				background: #F2F3F5;
-				border-radius: 8rpx;
-			}
+				.search_btn {
+					width: 72rpx;
+					color: #333333;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
 
-			.active {
-				color: #2D88F4;
-				background: #ECF5FF;
+					span {
+						display: block;
+						width: 1px;
+						height: 26rpx;
+						background-color: #eeeeee;
+					}
+				}
 			}
-		}
-	}
-
-	.list {
-		width: 100%;
-		flex: 1;
-		// padding: 0px 20rpx;
-		overflow-y: auto;
 
-		.product_item {
-			width: 100%;
-			background-color: #fff;
-			border-radius: 20rpx;
-			padding: 20rpx 40rpx;
-			margin-top: 20rpx;
-
-			.status {
+			.type {
 				display: flex;
-				align-items: center;
+				justify-content: space-between;
+				background-color: #fff;
+				padding: 8px 24rpx 16rpx;
 
-				.round {
+				.type_item {
+					height: 54rpx;
 					display: flex;
+					justify-content: center;
 					align-items: center;
-					color: #49A03F;
+					font-size: 26rpx;
+					color: #888888;
+					position: relative;
+					padding: 8rpx 12rpx;
+					background: #F2F3F5;
+					border-radius: 8rpx;
 				}
 
-				.round::before {
-					content: "";
-					display: inline-block;
-					width: 9rpx;
-					height: 9rpx;
-					background: #49A03F;
-					border-radius: 50%;
-					margin-right: 8rpx;
+				.active {
+					color: #2D88F4;
+					background: #ECF5FF;
 				}
+			}
+		}
 
-				.no {
-					color: #666666;
-				}
+		.list {
+			width: 100%;
+			flex: 1;
+			// padding: 0px 20rpx;
+			overflow-y: auto;
 
-				.no::before {
-					content: "";
-					display: inline-block;
-					width: 9rpx;
-					height: 9rpx;
-					background: #666666;
-					border-radius: 50%;
-					margin-right: 8rpx;
-				}
+			.product_item {
+				width: 100%;
+				background-color: #fff;
+				border-radius: 20rpx;
+				padding: 20rpx 40rpx;
+				margin-top: 20rpx;
 
-				.audit {
+				.status {
 					display: flex;
 					align-items: center;
-					color: #596ABB;
-				}
 
-				.audit::before {
-					content: "";
-					display: inline-block;
-					width: 9rpx;
-					height: 9rpx;
-					background: #596ABB;
-					border-radius: 50%;
-					margin-right: 8rpx;
-				}
+					.round {
+						display: flex;
+						align-items: center;
+						color: #49A03F;
+					}
 
-				.reject {
-					display: flex;
-					align-items: center;
-					color: #F55D65;
-				}
+					.round::before {
+						content: "";
+						display: inline-block;
+						width: 9rpx;
+						height: 9rpx;
+						background: #49A03F;
+						border-radius: 50%;
+						margin-right: 8rpx;
+					}
 
-				.reject::before {
-					content: "";
-					display: inline-block;
-					width: 9rpx;
-					height: 9rpx;
-					background: #F55D65;
-					border-radius: 50%;
-					margin-right: 8rpx;
-				}
+					.no {
+						color: #666666;
+					}
 
-				.line {
-					display: block;
-					width: 1rpx;
-					height: 20rpx;
-					background: #d9d9d9;
-					margin: 0 12rpx;
-				}
-			}
+					.no::before {
+						content: "";
+						display: inline-block;
+						width: 9rpx;
+						height: 9rpx;
+						background: #666666;
+						border-radius: 50%;
+						margin-right: 8rpx;
+					}
 
-			.details {
-				width: 100%;
-				height: auto;
-				min-height: 132rpx;
-				// height: 132rpx;
-				display: flex;
-				align-items: center;
-				margin-top: 20rpx;
+					.audit {
+						display: flex;
+						align-items: center;
+						color: #596ABB;
+					}
 
-				.img {
-					margin-right: 16rpx;
-					border-radius: 12rpx;
-					overflow: hidden;
+					.audit::before {
+						content: "";
+						display: inline-block;
+						width: 9rpx;
+						height: 9rpx;
+						background: #596ABB;
+						border-radius: 50%;
+						margin-right: 8rpx;
+					}
 
-					image {
-						width: 132rpx;
-						height: 132rpx;
+					.reject {
+						display: flex;
+						align-items: center;
+						color: #F55D65;
+					}
+
+					.reject::before {
+						content: "";
+						display: inline-block;
+						width: 9rpx;
+						height: 9rpx;
+						background: #F55D65;
+						border-radius: 50%;
+						margin-right: 8rpx;
+					}
+
+					.line {
+						display: block;
+						width: 1rpx;
+						height: 20rpx;
+						background: #d9d9d9;
+						margin: 0 12rpx;
 					}
 				}
 
-				.data {
-					flex: 1;
-					height: 100%;
+				.details {
+					width: 100%;
+					height: auto;
+					min-height: 132rpx;
+					// height: 132rpx;
 					display: flex;
-					flex-direction: column;
-					justify-content: space-between;
-					font-weight: 600;
-					font-style: 28rpx;
+					align-items: center;
+					margin-top: 20rpx;
 
-					.repertory {
-						font-size: 24rpx;
-						display: flex;
-						align-items: center;
-						color: #8A91A8;
-						font-weight: 400;
-						margin: 6rpx 0 10rpx 0;
+					.img {
+						margin-right: 16rpx;
+						border-radius: 12rpx;
+						overflow: hidden;
+
+						image {
+							width: 132rpx;
+							height: 132rpx;
+						}
 					}
 
-					.price {
+					.data {
+						flex: 1;
+						height: 100%;
 						display: flex;
-						align-items: center;
-						font-size: 30rpx;
+						flex-direction: column;
+						justify-content: space-between;
 						font-weight: 600;
+						font-style: 28rpx;
 
-						span {
-							font-size: 26rpx;
-							margin-left: 20rpx;
+						.repertory {
+							font-size: 24rpx;
+							display: flex;
+							align-items: center;
+							color: #8A91A8;
 							font-weight: 400;
+							margin: 6rpx 0 10rpx 0;
+						}
+
+						.price {
+							display: flex;
+							align-items: center;
+							font-size: 30rpx;
+							font-weight: 600;
 
+							span {
+								font-size: 26rpx;
+								margin-left: 20rpx;
+								font-weight: 400;
+
+							}
 						}
 					}
-				}
-				.ticket{
-					margin: 0 20rpx;
-					image{
-						width: 50rpx;
-						height: 50rpx;
-					}
-				}
 
-				.tag {
-					width: 40rpx;
-					height: 40rpx;
-					display: flex;
-					flex-direction: column;
-					align-items: center;
+					.ticket {
+						margin: 0 20rpx;
 
-					image {
+						image {
+							width: 50rpx;
+							height: 50rpx;
+						}
+					}
+
+					.tag {
 						width: 40rpx;
 						height: 40rpx;
-					}
-				}
+						display: flex;
+						flex-direction: column;
+						align-items: center;
 
-			}
+						image {
+							width: 40rpx;
+							height: 40rpx;
+						}
+					}
 
-			.btn_box {
-				width: 100%;
-				display: flex;
-				justify-content: flex-end;
-				align-items: center;
-				margin-top: 20rpx;
+				}
 
-				.delist {
-					width: 100rpx;
-					height: 50rpx;
-					border-radius: 8rpx;
-					border: 1px solid #CCCCCC;
+				.btn_box {
+					width: 100%;
 					display: flex;
-					justify-content: center;
+					justify-content: flex-end;
 					align-items: center;
-					font-size: 26rpx;
-					color: #666666;
-				}
-
-				.edit {
-					margin-left: 20rpx;
-					background: rgba(68, 154, 255, 0.05);
-					border: 1px solid #449AFF;
-					color: #449AFF;
-				}
-			}
-		}
-	}
-
-	.creat {
-		width: 100%;
-		height: 100rpx;
-		background-color: #fff;
-		display: flex;
-		justify-content: center;
-		align-items: center;
+					margin-top: 20rpx;
 
-		.btn {
-			width: 672rpx;
-			height: 76rpx;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
-			border-radius: 75rpx;
-			font-size: 28rpx;
-			color: #FFFFFF;
+					.delist {
+						width: 100rpx;
+						height: 50rpx;
+						border-radius: 8rpx;
+						border: 1px solid #CCCCCC;
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						font-size: 26rpx;
+						color: #666666;
+					}
 
-			image {
-				width: 40rpx;
-				height: 40rpx;
-				margin-right: 10rpx;
+					.edit {
+						margin-left: 20rpx;
+						background: rgba(68, 154, 255, 0.05);
+						border: 1px solid #449AFF;
+						color: #449AFF;
+					}
+				}
 			}
 		}
 
-		.operate {
+		.creat {
 			width: 100%;
+			height: 100rpx;
+			background-color: #fff;
 			display: flex;
-			// justify-content: space-between;
+			justify-content: center;
 			align-items: center;
-			padding: 0px 20rpx;
-			justify-content: space-between;
 
-			.delete {
-				width: 205rpx;
+			.btn {
+				width: 672rpx;
 				height: 76rpx;
-				background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
-				border-radius: 49rpx;
-				font-size: 28rpx;
-				color: #FFFFFF;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				margin-right: 24rpx;
-				margin-left: 140rpx;
-			}
-
-			.delist {
-				margin-left: 0rpx;
-				background: linear-gradient(90deg, #FFA05B 0%, #FF7918 100%);
-			}
-
-			.all {
-				width: 25%;
-				// height: 60rpx;
-				// border: 1px solid #999;
 				display: flex;
 				justify-content: center;
 				align-items: center;
+				background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
+				border-radius: 75rpx;
+				font-size: 28rpx;
+				color: #FFFFFF;
 
 				image {
 					width: 40rpx;
@@ -555,123 +557,165 @@ export default {
 					margin-right: 10rpx;
 				}
 			}
-		}
-	}
-
-	.popup {
-		width: 100vw;
-		height: 100vh;
-		position: fixed;
-		top: 0;
-		left: 0;
-		background: rgba(0, 0, 0, 0.4);
-		display: flex;
-		align-items: center;
-		justify-content: center;
 
-		.content {
-			width: 570rpx;
-			background: #FFFFFF;
-			border-radius: 16rpx;
-			padding: 0px 24rpx;
-			padding-bottom: 16rpx;
-
-			.title {
+			.operate {
 				width: 100%;
-				height: 86rpx;
-				font-size: 32rpx;
-				color: #333333;
-				font-weight: 600;
-				border-bottom: 1px solid #EEEEEE;
 				display: flex;
+				// justify-content: space-between;
 				align-items: center;
-				justify-content: center;
-			}
+				padding: 0px 20rpx;
+				justify-content: space-between;
 
-			.center {
-				font-size: 30rpx;
-				color: #333333;
-				line-height: 35rpx;
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				justify-content: center;
-				padding-top: 28rpx;
-				border-bottom: 1px solid #EEEEEE;
-				padding-bottom: 40rpx;
-				margin-bottom: 16rpx;
+				.delete {
+					width: 205rpx;
+					height: 76rpx;
+					background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
+					border-radius: 49rpx;
+					font-size: 28rpx;
+					color: #FFFFFF;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					margin-right: 24rpx;
+					margin-left: 140rpx;
+				}
 
-				.error {
-					text-align: center;
+				.delist {
+					margin-left: 0rpx;
+					background: linear-gradient(90deg, #FFA05B 0%, #FF7918 100%);
 				}
 
-				image {
-					width: 100rpx;
-					height: 100rpx;
-					margin-bottom: 10rpx;
+				.all {
+					width: 25%;
+					// height: 60rpx;
+					// border: 1px solid #999;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+
+					image {
+						width: 40rpx;
+						height: 40rpx;
+						margin-right: 10rpx;
+					}
 				}
 			}
+		}
 
-			.sub {
-				width: 320rpx;
-				height: 68rpx;
-				border-radius: 66rpx;
-				font-size: 28rpx;
-				color: #FFFFFF;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				margin: 0rpx auto;
+		.popup {
+			width: 100vw;
+			height: 100vh;
+			position: fixed;
+			top: 0;
+			left: 0;
+			background: rgba(0, 0, 0, 0.4);
+			display: flex;
+			align-items: center;
+			justify-content: center;
 
-				.button {
+			.content {
+				width: 570rpx;
+				background: #FFFFFF;
+				border-radius: 16rpx;
+				padding: 0px 24rpx;
+				padding-bottom: 16rpx;
+
+				.title {
+					width: 100%;
+					height: 86rpx;
+					font-size: 32rpx;
+					color: #333333;
+					font-weight: 600;
+					border-bottom: 1px solid #EEEEEE;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+				}
+
+				.center {
+					font-size: 30rpx;
+					color: #333333;
+					line-height: 35rpx;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+					padding-top: 28rpx;
+					border-bottom: 1px solid #EEEEEE;
+					padding-bottom: 40rpx;
+					margin-bottom: 16rpx;
+
+					.error {
+						text-align: center;
+					}
+
+					image {
+						width: 100rpx;
+						height: 100rpx;
+						margin-bottom: 10rpx;
+					}
+				}
+
+				.sub {
 					width: 320rpx;
 					height: 68rpx;
-					background: #449AFF;
 					border-radius: 66rpx;
+					font-size: 28rpx;
+					color: #FFFFFF;
 					display: flex;
 					align-items: center;
 					justify-content: center;
+					margin: 0rpx auto;
+
+					.button {
+						width: 320rpx;
+						height: 68rpx;
+						background: #449AFF;
+						border-radius: 66rpx;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+					}
 				}
-			}
 
-			.start {
-				background: #53CC48;
-			}
+				.start {
+					background: #53CC48;
+				}
 
-			.rest {
-				background: #FF8024;
+				.rest {
+					background: #FF8024;
+				}
 			}
 		}
 	}
-}
-
-.tab-container {
-	display: flex;
-	justify-content: space-around;
-
-	.tab-item {
-		position: relative;
-		padding: 18rpx 0;
-		cursor: pointer;
-		color: #333;
-		font-weight: 400;
-		font-size: 28rpx;
-	}
 
-	.tab-item.active {
-		color: #449AFF;
-		font-weight: 600;
-	}
+	.tab-container {
+		display: flex;
+		justify-content: space-around;
+
+		.tab-item {
+			position: relative;
+			padding: 18rpx 0;
+			cursor: pointer;
+			color: #333;
+			font-weight: 400;
+			font-size: 28rpx;
+		}
+
+		.tab-item.active {
+			color: #449AFF;
+			font-weight: 600;
+		}
 
-	.tab-item.active::after {
-		content: '';
-		position: absolute;
-		bottom: -28px;
-		left: 35%;
-		width: 38rpx;
-		height: 100%;
-		background: url(/static/product/tab-act.png) no-repeat;
-		background-size: contain;
+		.tab-item.active::after {
+			content: '';
+			position: absolute;
+			bottom: -28px;
+			left: 35%;
+			width: 38rpx;
+			height: 100%;
+			background: url(/static/product/tab-act.png) no-repeat;
+			background-size: contain;
+		}
 	}
-}
 </style>

+ 9 - 6
pages/product/index.vue

@@ -46,7 +46,7 @@
 					<span class="reject " v-if="item.productStatus =='3'" style="color:#F55D65 ;">未通过</span>
 					<span class="line"></span>
 					<span v-if="item.saleStartDate">{{item.saleStartDate.slice(0,10)}}-{{item.saleEndDate.slice(0,10)}}</span>
-					<view class="error insufficient" v-if="item.sellingOvertime && item.stockQuantity ==0">
+					<view class="error insufficient" v-if="item.stockQuantity ==0">
 						库存不足
 					</view>
 					<view class="error overtime" v-if="item.sellingOvertime && item.stockQuantity >0">
@@ -240,10 +240,13 @@
 			deletes(status) {
 				let shelves = []
 				this.productList.forEach(item => {
-					shelves.push({
-						productId: item.productId,
-						productStatus: status
-					})
+					if(item.select){
+						shelves.push({
+							productId: item.productId,
+							productStatus: status
+						})
+					}
+					
 				})
 
 				let that = this
@@ -256,7 +259,7 @@
 								.then(res => {
 									if (res.data.code == 200) {
 										uni.showToast({
-											title: this.productStatus==0?'上架成功':'下架成功',
+											title: status==0?'下架成功':'上架成功',
 											duration: 2000,
 											icon: 'none'
 										});

+ 22 - 8
pages/scan/record.vue

@@ -186,7 +186,8 @@
         };
          this.getList(page);
       },
-      getMonthRange(monthValue, year = new Date().getFullYear()) {
+      getMonthRange(monthValue) {
+				let year = new Date().getFullYear()
         const startDate = new Date(year, monthValue - 1, 1);
         const endDate = new Date(year, monthValue, 0);
         endDate.setHours(23, 59, 59, 999);
@@ -194,7 +195,12 @@
         const localEnd = endDate.toLocaleString();
         this.writeOffTimeStart = localStart
         this.writeOffTimeEnd = localEnd
-       
+       setTimeout(()=>{
+				 uni.showToast({
+				 	icon:'none',
+				 	title:this.writeOffTimeStart+'---'+this.writeOffTimeEnd
+				 })
+			 })
         // return {
         //   start: startDate, // 当月第一天 00:00:00
         //   end: endDate // 当月最后一天 23:59:59.999
@@ -213,14 +219,22 @@
         key: 'login_user_info',
         success: function(res) {
           that.merchantId = res.data.merchantId
+					const date = new Date();
+					// that.month = date.getMonth() + 1;
+					// that.showMonth = date.toLocaleString("zh-CN", {
+					//   month: "long",
+					// });
+					 let currentMonth = new Date().getMonth();
+					that.showMonth = that.timelist[currentMonth].label;
+					console.log(that.showMonth)
+					uni.showToast({
+						icon:'none',
+						title:that.showMonth
+					})
+					that.getMonthRange(that.timelist[currentMonth].value)
         }
       })
-      const date = new Date();
-      this.month = date.getMonth() + 1;
-      this.showMonth = date.toLocaleString("zh-CN", {
-        month: "long",
-      });
-      this.getMonthRange(this.month)
+      
 
     }
   }