Jelajahi Sumber

添加涨价设置入口, 去除涨价设置中的节日选择

shizhongqi 1 tahun lalu
induk
melakukan
cd079666ba

+ 24 - 13
hdApp/src/admin/goods/price-increase.vue

@@ -9,14 +9,14 @@
 		<block v-if="form.riseSwitch != 0">
 			<!-- 选项设置 -->
 			<div class="input-line-wrap new-wrap">
-				<tui-list-cell class="line-cell" :hover="false">
+				<!-- <tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title">涨价节日</div>
 					<div class="tui-input button-wrap">
 						<block v-for="(item, index) in festData" :key="index">
 							<button class="admin-button-com" :class="[form.festIdList.includes(item.id) ? '' : 'default']" @click="selFestFn(item)">{{ item.name || '暂无' }}</button>
 						</block>
 					</div>
-				</tui-list-cell>
+				</tui-list-cell> -->
 				<tui-list-cell class="line-cell" :hover="false">
 					<div class="tui-title">涨价方式</div>
 					<radio-group class="tui-input flex-center-between" @change="radioChange">
@@ -43,9 +43,12 @@
 					</tui-list-cell>
 				</block>
 			</div>
-			<div class="prompt-text">节日当天和前一天,要求涨价的商品统一按上面规则涨价。</div>
+			<!-- <div class="prompt-text">节日当天和前一天,要求涨价的商品统一按上面规则涨价。</div> -->
 		</block>
-		<button class="admin-button-com blue big confirm-btn" @click="setPrice">确定</button>
+		<div class="button-group">
+			<button class="admin-button-com default big cancel-btn" @click="goBack">取消</button>
+			<button class="admin-button-com blue big confirm-btn" @click="setPrice">确定</button>
+		</div>
 	</div>
 </template>
 
@@ -66,7 +69,7 @@
 				form: {
 					riseSwitch: '0',
 					riseType: '0',
-					festIdList: [],
+					//festIdList: [],
 					riseAmount: ''
 				}
 			}
@@ -86,17 +89,17 @@
 			_getDet() {
 				return getRise().then(res => {
 					if (this.$util.isEmpty(res.data)) return
-					res.data.festIdList = res.data.festIdList.map(e => e + '')
+					//res.data.festIdList = res.data.festIdList.map(e => e + '')
 					Object.keys(this.form).forEach((i, index) => {
 						this.form[i] = res.data[i]
 					})
 				})
 			},
 			setPrice() {
-				if (this.form.festIdList.length == 0) {
-					this.$msg('请先选择节日!')
-					return false
-				}
+				// if (this.form.festIdList.length == 0) {
+				// 	this.$msg('请先选择节日!')
+				// 	return false
+				// }
 				if (!this.form.riseAmount) {
 					this.$msg('请先输入比例或者金额!')
 					return false
@@ -119,6 +122,9 @@
 			radioChange(e) {
 				this.form.riseAmount = ''
 				this.form.riseType = e.detail.value
+			},
+			goBack() {
+				uni.navigateBack()
 			}
 		}
 	}
@@ -139,9 +145,14 @@
 			font-size: 28upx;
 		}
 	}
-	.confirm-btn {
-		width: calc(100% - 60upx);
-		margin: 60upx 30upx 0;
+	.button-group {
+		display: flex;
+		justify-content: space-between;
+		padding: 0 30upx;
+		margin-top: 60upx;
+	}
+	.cancel-btn, .confirm-btn {
+		width: 48%;
 	}
 	.switch-blo {
 		padding: 15upx 30upx;

+ 1 - 1
hdApp/src/admin/home/apply.vue

@@ -43,8 +43,8 @@ export default {
             list:[
                 { name: "花束", img: `${this.$constant.hostUrl}/image/ghs/home/hcgl2.png`, url: "/admin/goods/list",pf:1},
                 { name: "花束品种", img: `${this.$constant.hostUrl}/image/ghs/home/hcgl2.png`, url: "/admin/goods/kind",pf:1},
-                //{ name: "涨价设置", img: `${this.$constant.hostUrl}/image/ghs/home/hcgl2.png`, url: "/admin/goods/price-increase",pf:1},
                 { name: "商城分类", img: `${this.$constant.hostUrl}/image/ghs/home/hcgl2.png`, url: "/admin/goods/category",pf:1},
+                { name: "涨价设置", img: `${this.$constant.hostUrl}/image/ghs/home/gj2.png`, url: "/admin/goods/price-increase",pf:1},
             ]
         },
         {

+ 1 - 1
hdApp/src/pages.json

@@ -276,7 +276,7 @@
 				{ "path": "img-store", "style": { "navigationBarTitleText": "图库管理" } },
 				{ "path": "goods-name", "style": { "navigationBarTitleText": "填写商品信息" } },
 				{ "path": "freight", "style": { "navigationBarTitleText": "运费设置" } },
-				{ "path": "price-increase", "style": { "navigationBarTitleText": "节日自动涨价" } },
+				{ "path": "price-increase", "style": { "navigationBarTitleText": "涨价设置" } },
 				{ "path": "plant", "style": { "navigationBarTitleText": "盆栽绿植" } },
 				{ "path": "flower", "style": { "navigationBarTitleText": "鲜花商品" } },
 				{ "path": "flowerConfirm", "style": { "navigationBarTitleText": "确认" } },