shish 1 год назад
Родитель
Сommit
3ed74195df

+ 69 - 0
hdApp/src/admin/custom/levelChange.vue

@@ -0,0 +1,69 @@
+<template>
+    <view class="app-content">
+            <block v-if="!$util.isEmpty(list.data)">
+                <t-table :headerBackgroundColor="'#F0F2F6'">
+                    <t-tr header>
+                        <t-th>日期</t-th>
+                        <t-th><view style="width:150upx;">事项</view></t-th>
+                        <t-th>人员</t-th>
+                        <t-th>变化前</t-th>
+                        <t-th>变化后</t-th>
+                    </t-tr>
+                    <view v-for="(item, index) in list.data" :key="index">
+                        <t-tr>
+                            <t-td align="center" color="info"><view >{{ item.addTime.substr(5,11) }}</view></t-td>
+                            <t-td align="center" color="info"><view style="width:150upx;">{{ item.event }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.staffName }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.beforeName }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.afterName }}</view></t-td>
+                        </t-tr>
+                    </view>
+                </t-table>
+            </block>
+            <block v-else>
+                <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+            </block>
+        </view>
+    </template>
+    <script>
+    import AppWrapperEmpty from "@/components/app-wrapper-empty";
+    import { getMemberChange } from '@/api/member'
+    import list from '@/mixins/list'
+    export default {
+        name: "memberChange",
+        components: {
+            AppWrapperEmpty
+        },
+        mixins:[list],
+        data() {
+            return {
+            };
+        },
+        methods: {
+            async init(){
+                const res = await getMemberChange({ page:this.list.page,customId:this.option.customId })
+                if (this.$util.isEmpty(res.data.list)){
+                    this.completes(res)
+                    return
+                }
+                let currentList = res.data.list
+                res.data.list = currentList
+                this.completes(res)
+            }
+        },
+        async onPullDownRefresh() {
+            this.resetList();
+            await this.init()
+            uni.stopPullDownRefresh();
+        },
+        async onReachBottom() {
+            if (!this.list.finished) {
+                await this.init()
+                uni.stopPullDownRefresh();;
+            } else {
+                uni.stopPullDownRefresh();
+            }
+        }
+    };
+    </script>
+    <style lang="scss" scoped></style>

+ 46 - 21
hdApp/src/admin/member/detail.vue

@@ -5,12 +5,15 @@
         <app-avatar-module :src="data.avatarUrl" />
         <div class="user-top-right">
           <div>
-            <div class="flex-center"> <span class="app-size-32">{{ data.name }}</span> <text @click="changeNameFn()" style="color:#3385ff;margin-left:32upx;font-size:30upx;">修改</text></div>
+            <div class="flex-center" @click="changeNameFn()">
+              <span class="app-size-32">{{ data.name }}</span> 
+              <i class="iconfont iconbianji" style="font-size:25upx;margin-left:20upx;"></i>
+            </div>
             <div class="app-color-3">{{ data.originName }}</div>
             <div class="app-color-3">ID:{{ data.id }}</div>
           </div>
           <div class="source-wrap">
-            <i @click="callUp(data.mobile)" class="iconfont iconshoujihao1 mobileColor" style="font-size:50upx;" ></i>
+            <text style="font-weight:bold;font-size:30upx;color:#3385ff;">{{ data.memberName }} {{ data.discount }}</text>
           </div>
         </div>
       </div>
@@ -22,18 +25,13 @@
         </div>
 
         <div class="data-list">
-          <div class="app-size-30 app-bold">{{ buyAmount }}</div>
-          <div class="app-color-3">累计消费</div>
-        </div>
-
-        <div class="data-list">
-          <div class="app-size-30 app-bold">{{ growth }}</div>
-          <div class="app-color-3">成长值</div>
+          <div class="app-size-30 app-bold">{{ debtAmount }}</div>
+          <div class="app-color-3">欠款</div>
         </div>
 
         <div class="data-list">
-          <div class="app-size-30 app-bold">{{ debtAmount }}</div>
-          <div class="app-color-3">欠款</div>
+          <div class="app-size-30 app-bold">{{ buyAmount }}</div>
+          <div class="app-color-3">累计消费</div>
         </div>
 
       </div>
@@ -90,6 +88,9 @@
         <tui-list-cell @click="pageTo({ url: '/admin/custom/balanceChange?id='+data.id })" class="line-cell" :hover="false" :arrow="true" >
             <view class="tui-title">余额明细</view>
         </tui-list-cell>
+        <tui-list-cell @click="pageTo({ url: '/admin/custom/levelChange?id='+data.id })" class="line-cell" :hover="false" :arrow="true" >
+            <view class="tui-title">等级变动记录</view>
+        </tui-list-cell>
       </view>
     </view>
 
@@ -252,6 +253,15 @@
 		</template>
 		</modal-module>
 
+    <uni-popup ref="memeberChangeRef" background-color="#fff" type="center" :animation="true" class="class-popup-style">
+		<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+
+			<view style="width:100vw;margin-top:8upx;" v-for="(item,index) in weal" :key="index"><button @click="modifyMember(item)">{{ item.name }}</button></view>
+
+			<view style="width:100vw;margin-top:50upx;"><button @click="cancelModifyMember()">取消</button></view>
+		</view>
+	  </uni-popup>
+
   </div>
 </template>
 
@@ -263,7 +273,7 @@ import ModalModule from "@/components/plugin/modal";
 import { getLevel } from "@/utils/config";
 import TuiListCell from "@/components/plugin/list-cell";
 import { getUserDet, remarkAdd, remarkDel, upgrade, resetPassword } from "@/api/member";
-import { changeName } from "@/api/custom"
+import { changeName,changeMemberLevel } from "@/api/custom"
 import { getWeal } from "@/api/member"
 import {toManRecharge} from "@/api/recharge"
 export default {
@@ -290,24 +300,24 @@ export default {
       remarkModal: false,
       tabsData: [
         {
-          name: "优惠券",
+          name: "充值",
           img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
           funtion: () => {
-            this.$msg("开发中");
+			      this.rechargeModal = true
           }
         },
         {
-          name: "老带新",
-          img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
+          name: "修改等级",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
           funtion: () => {
-            this.$msg("开发中");
+            this.beginModifyMember()
           }
         },
         {
-          name: "充值",
-          img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
+          name: "老带新",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
           funtion: () => {
-			      this.rechargeModal = true
+            this.$msg("开发中");
           }
         },
         {
@@ -360,6 +370,21 @@ export default {
     this.init()
   },
   methods: {
+    beginModifyMember(){
+			this.$refs.memeberChangeRef.open('top')
+    },
+    cancelModifyMember(){
+      this.$refs.memeberChangeRef.close()
+    },
+    modifyMember(item){
+      changeMemberLevel({customId:this.option.id,level:item.level}).then(res=>{
+        if(res.code == 1){
+          this.$msg(res.msg)
+          this.cancelModifyMember()
+          this.getCustomInfo()
+        }
+      })
+    },
 		getRecharge(amount){
 			this.rForm.rechargeAmount = amount
 		},
@@ -589,7 +614,7 @@ export default {
   }
   .user-bottom {
     width: 100%;
-    @include disFlex(center, space-between);
+    @include disFlex(center, space-around);
     .data-list {
       text-align: center;
       .app-size-30 {

+ 1 - 1
hdApp/src/admin/member/discount.vue

@@ -29,7 +29,7 @@
 			</t-table>
 			<view style="font-size:36upx;font-weight:bold;height:50upx;margin-top:50upx;display: flex;align-items: center;justify-content: center;">
 				超过
-				<input v-model="reduceDay" type="number" @focus="reduceDay=''" placeholder="填0则不自动降级" style="border:1upx solid #cccccc;color:black;font-size:30upx;width:180upx;display: inline-block;text-align:center;margin:0 10upx 0 10upx;" />
+				<input v-model="reduceDay" type="number" @focus="reduceDay=''" placeholder="填0则不自动降级" style="border:1upx solid #cccccc;color:black;font-size:28upx;width:200upx;display: inline-block;text-align:center;margin:0 10upx 0 10upx;" />
 				天未消费降一级
 			</view>
 

+ 5 - 0
hdApp/src/api/custom/index.js

@@ -1,5 +1,10 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+//修改会员等级
+export const changeMemberLevel = data => {
+	return https.get('/custom/change-level', data)
+}
+
 export const batchAddCumtom = data => {
 	return https.post('/custom/batch-add-custom', data)
 }

+ 4 - 0
hdApp/src/api/member/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const getMemberChange = data => {
+	return https.get("/member-change/list", data);
+};
+
 export const getWeal = data => {
 	return https.get("/member-weal/get-weal", data);
 };

+ 2 - 1
hdApp/src/pages.json

@@ -45,7 +45,8 @@
 			"pages": [
 				{"path": "addCustom","style": {"navigationBarTitleText": "添加客户"}},
 				{"path": "balanceChange","style": {"navigationBarTitleText": "余额变动明细"}},
-				{"path": "rechargeChange","style": {"navigationBarTitleText": "充值记录"}}
+				{"path": "rechargeChange","style": {"navigationBarTitleText": "充值记录"}},
+				{"path": "levelChange","style": {"navigationBarTitleText": "等级变动记录"}}
 			]
 		},
 		{