Browse Source

Merge branch 'master' of http://39.101.143.165:8090/hxl13994548489/LocalLivingServicesUniapp

lihongxiao 1 year ago
parent
commit
3732939217
3 changed files with 47 additions and 7 deletions
  1. 12 3
      pages/order/record.vue
  2. 35 4
      pages/product/index.vue
  3. BIN
      static/product/round.png

+ 12 - 3
pages/order/record.vue

@@ -203,10 +203,19 @@
 			},
 			// 同意退款
 			agree(item){
-				uni.showToast({
-					icon: 'none',
-					title: '商家已同意退款'
+				let data = {
+					reOrderId:this.orderNo
+				}
+				this.$http.post("/app/order/locaOrder/agreeRefund",data).then(res => {
+					if (res.statusCode == 200) {
+						uni.showToast({
+							icon: 'none',
+							title: '商家已同意退款'
+						})
+						this.getRecord()
+					}
 				})
+				
 			}
 		},
 		mounted() {

+ 35 - 4
pages/product/index.vue

@@ -46,6 +46,13 @@
 					<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>
+					<view class="error overtime" v-if="item.sellingOvertime && item.stockQuantity >0">
+						售卖超时
+					</view>
+
 
 					<!-- <span>已售:{{item.num}}</span>
 					<span>库存:{{item.inventory}}</span> -->
@@ -233,13 +240,13 @@
 						productStatus: status
 					})
 				})
-				
+
 				let that = this
 				uni.showModal({
 					title: this.productStatus==0?'确定上架商品?':'确定下架商品?',
 					success: function(res) {
 						if (res.confirm) {
-						
+
 							that.$http.post("/app/product/shelves", shelves)
 								.then(res => {
 									if (res.data.code == 200) {
@@ -248,7 +255,7 @@
 											duration: 2000,
 											icon: 'none'
 										});
-									that.$router.go(0)
+										that.$router.go(0)
 										that.isManage = false
 										that.isAll = false
 									}
@@ -353,7 +360,7 @@
 											duration: 2000,
 											icon: 'none'
 										});
-										
+
 									}
 								})
 						} else if (res.cancel) {
@@ -565,6 +572,7 @@
 				.status {
 					display: flex;
 					align-items: center;
+					position: relative;
 
 					.round {
 						display: flex;
@@ -635,6 +643,29 @@
 						background: #d9d9d9;
 						margin: 0 12rpx;
 					}
+
+					.error {
+						position: absolute;
+						top: 0;
+						right: 0;
+						width: 140rpx;
+						height: 53rpx;
+
+						border-radius: 4rpx;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+					}
+
+					.overtime {
+						background: #FFF2E8;
+						color: #FF7918;
+					}
+
+					.insufficient {
+						background: #FFE8E8;
+						color: #FF1818;
+					}
 				}
 
 				.details {

BIN
static/product/round.png