Kaynağa Gözat

门店优化;客户列表优化

shish 10 ay önce
ebeveyn
işleme
95281606a1

+ 4 - 5
ghsApp/src/admin/home/me.vue

@@ -20,12 +20,11 @@
               <image :src="myInfo.smallShopImg" class="avatar-img" mode="aspectFill" @click="pageTo({url:'/admin/home/login'})" v-else></image>
 
               <view class="top-info_box" v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentGhsShopId > 0" @click="pageTo({url: '/admin/shop/add?id='+myInfo.shopInfo.id})">
-                <view> {{ myInfo.shopName||'' }}
-                <text v-if="myInfo.shopInfo && myInfo.shopInfo.default && myInfo.shopInfo.default == 1" class="default-shop">总店</text>
+                <view> {{ myInfo.sjName||'' }}
                 </view>
                 <view style="display: flex; align-items: center;">
-                  <text>{{ myInfo.sjName||'' }} | ID {{myInfo.shopId||''}}</text>
-                  <text class="edit-icon" @click.stop="editShopName">✏️</text>
+                  <text>{{ myInfo.shopName||'' }} | ID {{myInfo.shopId||''}}</text>
+                  <text v-if="myInfo.shopInfo && myInfo.shopInfo.default && myInfo.shopInfo.default == 1" class="default-shop">总店</text>
                 </view>
               </view>
               <view class="top-info_box" @click="pageTo({url:'/admin/home/login'})" v-else>
@@ -173,7 +172,7 @@
           <text class="right" @click.stop="goToPrivacy">隐私政策</text>
           <text class="right" @click.stop="closeAccount()">注销账号</text>
         </view>
-        <view class="bottom-version">中央编号 {{myInfo && myInfo.shopInfo && myInfo.shopInfo.mainId ? myInfo.shopInfo.mainId : 0}}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;version {{version}}</view>
+        <view class="bottom-version" @click.stop="editShopName">中央编号 {{myInfo && myInfo.shopInfo && myInfo.shopInfo.mainId ? myInfo.shopInfo.mainId : 0}}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;version {{version}}</view>
         <view class="bottom-version">闽ICP备15017325号-12A</view>
 
       </view>

+ 4 - 12
ghsApp/src/admin/home/member.vue

@@ -34,7 +34,6 @@
                   <span v-if="Number(item.remainDebtAmount)>0" class="debt-amount">
                     欠款<span class="amount_num">{{ item.remainDebtAmount }}</span>
                   </span>
-
                   <span v-if="Number(item.remainDebtAmount)<0" class="debt-amount">
                     余额<span class="amount_num" style="color:#3385FF;">{{ Math.abs(item.remainDebtAmount) }}</span>
                   </span>
@@ -51,6 +50,9 @@
                   <text style="font-size:28upx;margin-left:20upx;color:#3385FF;font-weight:bold;">待审核</text>
                 </block>
 
+                <text v-if="Number(item.black)==2" style="color:red;font-weight:bold;margin-left:20upx;">黑名单</text>
+                <text v-if="Number(item.delStatus)==1" style="color:red;font-weight:bold;margin-left:20upx;">已删除</text>
+
               </div>
             </div>
           </div>
@@ -243,22 +245,12 @@ export default {
       }
     },
     getCustomList() {
-      return getList({
-          search: "",
-          type:this.tabIndex,
-          page: this.list.page,
-          name: this.seekVal,
-        }).then((res) => {
+      return getList({ search: "", type:this.tabIndex, page: this.list.page, name: this.seekVal, }).then((res) => {
           this.completes(res);
           if (this.$util.isEmpty(res.data)){
             return false;
           }
           this.tabs[this.tabIndex].value = res.data.totalNum || 0;
-        }).catch(err => {
-          this.$msg('网络异常,重新加载');
-          this.resetList();
-          this.getCustomList()
-          uni.stopPullDownRefresh()
         })
     },
     change(e) {

+ 4 - 0
ghsApp/src/api/custom/index.js

@@ -106,4 +106,8 @@ export const createCumtomer = data => {
 
 export const copyCumtomer = data => {
 	return https.get('/custom/copy-customers', data)
+}
+
+export const changeDelStatus = data => {
+	return https.get('/custom/change-del-status', data)
 }

+ 33 - 9
ghsApp/src/pagesClient/member/detail.vue

@@ -18,6 +18,10 @@
                     <text v-if="userInfo.overTimeUnExpend && userInfo.overTimeUnExpend == 30" style="margin-left:40upx;color:green;font-weight:bold;">超1个月未下单</text>
                     <text v-if="userInfo.overTimeUnExpend && userInfo.overTimeUnExpend == 180" style="margin-left:40upx;color:green;font-weight:bold;">超半年未下单</text>
                     <text v-if="userInfo.overTimeUnExpend && userInfo.overTimeUnExpend == 365" style="margin-left:40upx;color:green;font-weight:bold;">超1年未下单</text>
+
+                    <text v-if="Number(userInfo.black)==2" style="color:red;font-weight:bold;margin-left:40upx;">黑名单</text>
+                    <text v-if="Number(userInfo.delStatus)==1" style="color:red;font-weight:bold;margin-left:40upx;">已删除</text>
+
                   </view>
                 </view>
             </view>
@@ -209,6 +213,15 @@
               </div>
             </tui-list-cell>
 
+            <tui-list-cell class="line-cell" :hover="false">
+              <div class="tui-title">删除客户</div>
+              <div class="switch_bx">
+                <text v-if="form.delStatus == 1">已删</text>
+                <text v-else>未删</text>
+                <switch :checked="form.delStatus == 1 ? true : false" @change="delChangeFn" style="transform: scale(0.8,0.8)" />
+              </div>
+            </tui-list-cell>
+
             <tui-list-cell class="line-cell" :hover="false">
               <div class="tui-title">短名称</div>
               <input v-model="userInfo.shortName" @click="userInfo.shortName=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="请填写" type="text" style="width:48%;border:1upx solid #ddd;margin-right:12upx;height:70upx;text-align:center;" />
@@ -298,7 +311,7 @@ import ModalModule from "@/components/plugin/modal"
 import { getUserDet,debt} from "@/api/member";
 import { IMGHOST } from '@/config'
 import { mapGetters } from "vuex"
-import { changeShowStock,changePassStatus,toChangeHome,changeWlName,modifyShortName,modifyHomeAmount,changeLevel,createSeatSnFn,modifySeatSnFn } from "@/api/custom"
+import { changeShowStock,changePassStatus,toChangeHome,changeWlName,modifyShortName,modifyHomeAmount,changeLevel,createSeatSnFn,modifySeatSnFn,changeDelStatus } from "@/api/custom"
 import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName,rechargeFn,getGatheringCode} from "@/api/custom";
 export default {
   name: "detail",
@@ -315,6 +328,7 @@ export default {
         name:'',
         debt: 0,
         black: 1,
+        delStatus:0,
         showStock:0,
         passStatus:0,
         home:1,
@@ -646,15 +660,24 @@ export default {
         }
       })
     },
-    async blackChangeFn(e){
+    delChangeFn(e){
+      this.form.delStatus = e.detail.value ? 1 : 0;
+      changeDelStatus({id:this.userInfo.id,delStatus:this.form.delStatus}).then(res=>{
+        if(res.code == 1){
+          this.$msg('操作成功')
+          this.getUserDetail()
+        }
+      })
+    },
+    blackChangeFn(e){
       this.form.black = e.detail.value ? 2 : 1;
-      try {
-        let res = await updateCustomBlack({ black: this.form.black, customId: this.userInfo.id })
-        let msg = e.detail.value ? '已拉黑' : '已开放'
-        this.$msg(msg);
-      } catch (err) {
-        console.log(err)
-      }
+      updateCustomBlack({ black: this.form.black, customId: this.userInfo.id }).then(res=>{
+        if(res.code == 1){
+          let msg = e.detail.value ? '已拉黑' : '已开放'
+          this.$msg(msg)
+          this.getUserDetail()
+        }
+      })
     },
     callUp() {
       uni.makePhoneCall({
@@ -671,6 +694,7 @@ export default {
         this.form.debt = this.userInfo.debt
         this.form.level = this.userInfo.level
         this.form.black = this.userInfo.black
+        this.form.delStatus = this.userInfo.delStatus
         this.form.showStock = this.userInfo.showStock
         this.form.passStatus = this.userInfo.passStatus
         this.form.home = this.userInfo.home

+ 3 - 4
hdApp/src/admin/home/me.vue

@@ -18,10 +18,9 @@
               </image>
 
               <view class="top-info_box" v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentShopId > 0" @click="pageTo({url: '/admin/shop/add?id='+myInfo.shopInfo.id})">
-                <view> {{ myInfo.shopName||'' }} </view>
+                <view> {{ myInfo.sjName||'' }} </view>
                 <view style="display: flex; align-items: center;">
-                  <text>{{ myInfo.sjName||'' }} | ID {{myInfo.shopId||''}}</text>
-                  <text class="edit-icon" @click.stop="editShopName">✏️</text>
+                  <text>{{ myInfo.shopName||'' }} | ID {{myInfo.shopId||''}}</text>
                 </view>
               </view>
 
@@ -129,7 +128,7 @@
           <text class="right" @click.stop="goToPrivacy">隐私政策</text>
           <text class="right" @click.stop="closeAccount()">注销账号</text>
         </view>
-        <view class="bottom-version">中央编号 {{myInfo && myInfo.mainId ? myInfo.mainId : 0}}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;version {{version}}</view>
+        <view class="bottom-version" @click.stop="editShopName">中央编号 {{myInfo && myInfo.mainId ? myInfo.mainId : 0}}&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;version {{version}}</view>
         <view class="bottom-version">闽ICP备15017325号-11A</view>
       </view>
     </template>