shish 4 лет назад
Родитель
Сommit
fc63f5c7c3

+ 16 - 16
ghsApp/src/admin/home/apply.vue

@@ -31,6 +31,22 @@ export default {
     data(){
         return {
             menuList: [
+                {
+                    title:'营销推广',
+                    list:[
+                        {name: "红包",img: `${this.$constant.imgUrl}/ghs/home/yqyl.png`,url: "/admin/hb/list"},
+                        {name: "充值活动",img: `${this.$constant.imgUrl}/ghs/home/yqyl.png`,url: "/admin/item/rechargeHb"},
+                        {name: "邀请开店",img: `${this.$constant.imgUrl}/ghs/home/yqyl.png`,url: "/pagesInvite/list"}
+                    ]
+                },
+                {
+                    title:'花材',
+                    list:[
+                        {name: "花材",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/list"},
+                        {name: "花材分类",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/itemClass/list"},
+                        {name: "小菊颜色",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/xjSelect"},
+                    ]
+                },
                 {
                     title:'门店',
                     list:[
@@ -45,14 +61,6 @@ export default {
                         {name: "报损单",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/breakage/list"},
                     ]
                 },
-                {
-                    title:'花材',
-                    list:[
-                        {name: "花材",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/list"},
-                        {name: "花材分类",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/itemClass/list"},
-                        {name: "小菊颜色",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/xjSelect"},
-                    ]
-                },
                 {
                     title:'统计',
                     list:[
@@ -63,14 +71,6 @@ export default {
                         {name: "采购统计",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/statistics/cgStat"},
                         {name: "应付款",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/statistics/mayPayStat"},
                     ]
-                },
-                {
-                    title:'营销推广',
-                    list:[
-                        {name: "红包",img: `${this.$constant.imgUrl}/ghs/home/yqyl.png`,url: "/admin/hb/list"},
-                        {name: "充值返利",img: `${this.$constant.imgUrl}/ghs/home/yqyl.png`,url: "/admin/item/rechargeHb"},
-                        {name: "邀请开店",img: `${this.$constant.imgUrl}/ghs/home/yqyl.png`,url: "/pagesInvite/list"}
-                    ]
                 }
             ]
         }

+ 26 - 13
ghsApp/src/admin/item/rechargeHb.vue

@@ -1,9 +1,9 @@
 <template>
 	<view class="ex-page">
         <view class="title">
-        活动状态:<switch style="transform: scale(0.8,0.8)" :checked="rechargeSwitch == 0 ? false : true" @change="rechargeChange" />
-        <text v-if="rechargeSwitch == 0">关闭</text><text v-else>开启</text>
-        <button class="admin-button-com middle blue" @click="addHb()" style="float:right;margin-right:20rpx;">新增红包</button>
+            活动状态:<switch style="transform: scale(0.8,0.8)" :checked="rechargeSwitch == 0 ? false : true" @change="rechargeChange" />
+            <text v-if="rechargeSwitch == 0">关闭</text><text v-else>开启</text>
+            <button class="admin-button-com middle blue" @click="addHb()">新增选项</button>
         </view>
         <view class="recharge-list">
 
@@ -11,12 +11,12 @@
 
                 <view class="item">
 
-                    <view>充值:<input v-model="item.amount" @click="discount=''" placeholder-class="phcolor" class="tui-input" type="digit" style="width:150rpx;border:1px solid #ddd;display:inline-block;margin:0 10rpx 0 10rpx;" />元</view>
-                    <view>赠送红包:<input v-model="item.num" @click="discount=''" placeholder-class="phcolor" class="tui-input" type="digit" style="width:100rpx;border:1px solid #ddd;display:inline-block;margin:0 10rpx 0 10rpx;" />个</view>
-                    <view>每个红包:<input v-model="item.hbAmount" @click="discount=''" placeholder-class="phcolor" class="tui-input" type="digit" style="width:120rpx;border:1px solid #ddd;display:inline-block;margin:0 10rpx 0rpx 10rpx;" />元</view>
-                    <view>最低消费:<input v-model="item.miniExpend" placeholder-class="phcolor" class="tui-input" type="digit" style="width:120rpx;border:1px solid #ddd;display:inline-block;margin:0 10rpx 0 10rpx;" />元红包可用</view>
-                    <view>红包有效期:<input v-model="item.valid" placeholder-class="phcolor" class="tui-input" type="digit" style="width:100rpx;border:1px solid #ddd;display:inline-block;margin:0 10rpx 0 10rpx;" />天
-                    <button class="admin-button-com mini blue" @click="del(item)" style="margin-left:50rpx;">删除</button>
+                    <view>充值金额:<input v-model="item.amount" @click="discount=''" placeholder-class="phcolor" class="tui-input" type="digit" style="width:180rpx;border:1px solid #ddd;display:inline-block;margin:0 10rpx 0 10rpx;" />元</view>
+                    <view>赠送红包:<input v-model="item.num" @click="discount=''" placeholder-class="phcolor" class="tui-input" type="digit" style="width:180rpx;border:1px solid #ddd;display:inline-block;margin:0 10rpx 0 10rpx;" />个</view>
+                    <view>每个红包:<input v-model="item.hbAmount" @click="discount=''" placeholder-class="phcolor" class="tui-input" type="digit" style="width:180rpx;border:1px solid #ddd;display:inline-block;margin:0 10rpx 0rpx 10rpx;" />元</view>
+                    <view>最低消费:<input v-model="item.miniExpend" placeholder-class="phcolor" class="tui-input" type="digit" style="width:180rpx;border:1px solid #ddd;display:inline-block;margin:0 10rpx 0 10rpx;" />元可用</view>
+                    <view>有效时长:<input v-model="item.valid" placeholder-class="phcolor" class="tui-input" type="digit" style="width:180rpx;border:1px solid #ddd;display:inline-block;margin:0 10rpx 0 10rpx;" />天
+                    <button class="admin-button-com mini default" @click="delHb(item)" style="margin-left:150rpx;">删除</button>
                     </view>
 
                 </view>
@@ -69,16 +69,16 @@ export default {
                 that.rechargeSwitch = res.data.recharge;
                 if(!this.$util.isEmpty(res.data.list)){
                    that.recharge = res.data.list.map(e=>{
-                       return {amount:e.amount,num:e.num,hbAmount:e.hbAmount,miniExpend:e.miniExpend,valid:e.valid}
+                       return {amount:parseFloat(e.amount),num:e.num,hbAmount:parseFloat(e.hbAmount),miniExpend:parseFloat(e.miniExpend),valid:e.valid}
                    })
                 }else{
                     that.recharge = [
-                        {amount:'',num:'',hbAmount:'',miniExpend:'',valid:''}
+                        {amount:5000,num:2,hbAmount:5,miniExpend:200,valid:30}
                     ]
                 }
             });
         },
-        del(item){
+        delHb(item){
             if(this.recharge.length <= 1){
                 this.$msg("最少需要保留一个")
                 return false
@@ -86,9 +86,14 @@ export default {
             var index = this.recharge.indexOf(item); 
             if (index > -1) { 
                 this.recharge.splice(index, 1)
+                this.$msg("删除成功")
             }
         },
         addHb(){
+            if(this.recharge.length > 6){
+                this.$msg("最多只能设置6个")
+                return false
+            }
             this.recharge.push({amount:'',num:'',hbAmount:'',miniExpend:'',valid:''})
         },
         saveHb(){
@@ -150,15 +155,23 @@ export default {
 <style lang="scss" scoped>
 .ex-page{
     .title{
-        margin-bottom:50rpx;
+        position: fixed;
+        z-index:999999;
         padding-left:20rpx;
         font-size:30rpx;
+        background:white;
+        width:100%;
+        button{
+            position: fixed;
+            right:10rpx;
+        }
     }
     .recharge-list{
         line-height:80px;
         padding-left:20rpx;
         font-size:30rpx;
         padding-bottom:100rpx;
+        padding-top:110rpx;
         .item{
             margin-bottom:60rpx;
             input{

+ 1 - 1
ghsApp/src/pages.json

@@ -519,7 +519,7 @@
 				{"path": "detail","style": {"navigationBarTitleText": "花材详情"}},
 				{"path": "xj","style": {"navigationBarTitleText": "请选择颜色"}},
 				{"path": "xjSelect","style": {"navigationBarTitleText": "小菊颜色选择"}},
-				{"path": "rechargeHb","style": {"navigationBarTitleText": "充值"}}
+				{"path": "rechargeHb","style": {"navigationBarTitleText": "充值活动"}}
 			]
 		},
 		{

+ 2 - 2
hdApp/src/admin/coupon/couponList.vue

@@ -9,10 +9,10 @@
 					<div class="list-img">
 						<!-- 已过期 -->
 						<template v-if="tabIndex == 2">
-							<img :src="`${constant.imgUrl}/retail/coupon/expired.png`" alt mode="widthFix" />
+							<img :src="`${constant.imgUrl}/retail/coupon/expired2.png`" alt mode="widthFix" />
 						</template>
 						<template v-else>
-							<img :src="`${constant.imgUrl}/retail/coupon/bg.png`" alt mode="widthFix" />
+							<img :src="`${constant.imgUrl}/retail/coupon/bg2.png`" alt mode="widthFix" />
 						</template>
 					</div>
 					<!-- 列表 -->

+ 1 - 1
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -8,7 +8,7 @@
           <view class="shop_title">{{pageInfo.name||''}}</view>
 
 			<view v-if="pageInfo.hasRechargeHb && pageInfo.hasRechargeHb ==1" class="shop_intro" @tap="recharge(pageInfo)">
-				<text>有充有送,最高送{{parseFloat(pageInfo.hasRechargeHbAmount)}}元
+				<text>充值送红包,最高{{parseFloat(pageInfo.hasRechargeHbAmount)}}元
 					<text style="z-index:999999;margin-left:15rpx;color:red;border:1px solid red;padding:3rpx 10rpx 3rpx 10rpx;border-radius:10rpx;">去充值</text>
 				</text>
 			</view>