소스 검색

清空已购

shish 1 년 전
부모
커밋
c59c10d310
4개의 변경된 파일232개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 2
      ghsApp/src/admin/item/detail.vue
  2. 220 0
      ghsApp/src/admin/item/hasLimitBuyCustom.vue
  3. 5 0
      ghsApp/src/api/item/index.js
  4. 2 1
      ghsApp/src/pages.json

+ 5 - 2
ghsApp/src/admin/item/detail.vue

@@ -166,10 +166,10 @@
 
         <tui-list-cell class="line-cell" :hover="false">
           <view class="tui-title">每人限购</view>
-          <input v-model="form.limitBuy" style="width:300upx;" @focus="form.limitBuy=''" placeholder-class="phcolor" class="tui-input" name="limitBuy" placeholder="请填写,填0不限购" maxlength="50" type="number" />
+          <input v-model="form.limitBuy" style="width:110upx;" @focus="form.limitBuy=''" placeholder-class="phcolor" class="tui-input" name="limitBuy" placeholder="0不限购" maxlength="50" type="number" />
 
           <button v-if="productData.id > 0 && form.limitBuy>0" class="admin-button-com blue middle" @click.stop="clearBuyCache()" style="width:150upx;">清已购</button>
-          <button v-else class="admin-button-com default middle" style="width:150upx;" @click.stop="">清已购</button>
+          <button v-if="productData.id > 0 && form.limitBuy>0" class="admin-button-com blue middle" style="width:180upx;margin-left:10upx;" @click.stop="hasBuyList">已购列表</button>
 
         </tui-list-cell>
 
@@ -556,6 +556,9 @@ export default {
     }
   },
   methods: {
+    hasBuyList(){
+      this.$util.pageTo({url: '/admin/item/hasLimitBuyCustom?id='+this.productData.id})
+    },
     clearBuyCache(){
       let that = this
       that.$util.confirmModal({content:'确认清除已购?清除后客户可再次下单'},() => {

+ 220 - 0
ghsApp/src/admin/item/hasLimitBuyCustom.vue

@@ -0,0 +1,220 @@
+<template>
+  <div class="app-main app-content">
+    <block v-if="!$util.isEmpty(customList)">
+      <block v-for="(item, index) in customList" :key="index">
+        <tui-list-cell :arrow="true" @click="pageTo({url:'/pagesClient/member/detail?id='+item.id})">
+          <div class="tui-msg-box">
+            <img :src="item.smallAvatar" class="tui-msg-pic" mode="widthFix" />
+            <div class="tui-msg-item">
+              <div class="tui-msg-name">
+                <div class="tui-user-name">
+                  {{ item.name }}
+                  <text v-if="item.level == 2" class="super-man">大客户</text>
+                </div>
+              </div>
+              <div class="tui-msg-content">
+                <span>{{ item.visitTime.substr(5,11) }}</span>
+              </div>
+            </div>
+          </div>
+        </tui-list-cell>
+      </block>
+    </block>
+    <block v-else>
+      <app-wrapper-empty :is-empty="$util.isEmpty(customList)" title="暂无记录" />
+    </block>
+  </div>
+</template>
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import BadgeModule from "@/components/plugin/badge";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import appVipModule from "@/components/module/app-vip";
+import AppTag from "@/components/module/app-tag.vue";
+import AppSearchModule from "@/components/module/app-search";
+import { list } from "@/mixins";
+import { hasLimitBuyCustomList } from "@/api/item";
+export default {
+  name: "hasLimitBuyCustom",
+  components: {
+    TuiListCell,
+    BadgeModule,
+    AppWrapperEmpty,
+    appVipModule,
+    AppTag,
+    AppSearchModule
+  },
+  mixins: [list],
+  data() {
+    return {
+      customList:[]
+    };
+  },
+  methods: {
+    init() {
+      hasLimitBuyCustomList({id:this.option.id}).then(res=>{
+        if(res.code == 1){
+          this.customList = res.data.customList?res.data.customList:[]
+        }
+      })
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.app-content {
+  padding-top: 10upx;
+  padding-bottom: 20upx;
+}
+.tabs-wrap {
+  position: fixed;
+  .tabs-left {
+    width: 80%;
+  }
+  .tabs-right {
+    width: 19%;
+    border-left: $borderColor;
+    @include disFlex(center, center);
+  }
+}
+  .input-wrap_box {
+    background-color: #fff;
+    position: fixed;
+    top: 0;
+    z-index: 10;
+    width: 100%;
+    height: 100upx;
+    display: flex;
+    align-items: center;
+    padding: 0 30upx;
+    & > view:nth-child(1) {
+      flex: 1;
+    }
+  }
+.tui-msg-box {
+  display: flex;
+  align-items: center;
+
+  .tui-msg-pic {
+    width: 80upx;
+    height: 80upx;
+    border-radius: 50%;
+    margin-right: 20upx;
+  }
+
+  .tui-msg-item {
+    max-width: 500upx;
+    min-height: 80upx;
+    overflow: hidden;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    & > div {
+      @include disFlex(center, flex-start);
+      & > div:first-child {
+        margin-right: 8upx;
+      }
+    }
+    .level-img {
+      ::v-deep.vip-text {
+        left: 70upx;
+        top: 8upx;
+      }
+    }
+    .normal-img {
+      width: 70upx;
+      padding: 2upx 6upx;
+      color: #999;
+      background-color: #f0f2f6;
+      border-radius: 20upx;
+      .vip-text {
+        font-size: 24upx;
+        transform: scale(0.6);
+        position: relative;
+        top: -2upx;
+        left: -8upx;
+      }
+    }
+    .member-img {
+      width: 70upx;
+      padding: 2upx 6upx;
+      color: green;
+      background-color: #f0f2f6;
+      border-radius: 20upx;
+      .vip-text {
+        font-size: 24upx;
+        transform: scale(0.6);
+        position: relative;
+        top: -2upx;
+        left: -8upx;
+      }
+    }
+    .iconfont {
+      color: #00aaed;
+    }
+  }
+
+  .tui-msg-name {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-size: 30upx;
+    line-height: 1;
+    color: #262b3a;
+    .tui-user-name {
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      width: 290upx;
+      .super-man{
+        margin-left:20upx;
+        color:red;
+        font-size:24upx;
+        display:inline-block;
+        color:white;
+        border:1upx solid green;
+        padding:8upx 10upx;
+        background-color: green;
+        border-radius: 11upx;
+      }
+    }
+  }
+
+  .tui-msg-content {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-size: 24upx;
+    line-height: 1;
+    color: #9397a4;
+    .debt-amount{
+      margin-left:20upx;
+      .amount_num{
+        color:red;
+        margin-left:6upx;
+        font-weight:bold;
+      }
+    }
+  }
+}
+.tui-msg-right {
+  max-width: 120upx;
+  height: 80upx;
+  margin-left: auto;
+  margin-right: 24upx;
+  text-align: right;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.user_tag {
+  border: 1upx solid #cccccc;
+  padding: 5upx 12upx 5upx 12upx;
+  border-radius: 25upx;
+  color: #bbbbbb;
+  margin-right: 10upx;
+  margin-bottom: 12upx;
+  display: inline-block;
+  font-size: 30upx;
+}
+</style>

+ 5 - 0
ghsApp/src/api/item/index.js

@@ -1,5 +1,10 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+//限购花材已购客户列表
+export const hasLimitBuyCustomList = data => {
+	return https.get('/item/has-limit-buy-custom-list', data)
+}
+
 export const clearLimitBuy = data => {
 	return https.get('/item/clear-limit-buy', data)
 }

+ 2 - 1
ghsApp/src/pages.json

@@ -433,7 +433,8 @@
 				{"path": "select","style": {"navigationBarTitleText": "添加花材"}},
 				{"path": "loan","style": {"navigationBarTitleText": "花材列表"}},
 				{"path": "change","style": {"navigationBarTitleText": "更换花材"}},
-				{"path": "lakala","style": {"navigationBarTitleText": "拉卡拉"}}
+				{"path": "lakala","style": {"navigationBarTitleText": "拉卡拉"}},
+				{"path": "hasLimitBuyCustom","style": {"navigationBarTitleText": "已购列表"}, "enablePullDownRefresh": false}
 			]
 		},
 		{