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

+ 2 - 2
ghsApp/src/admin/home/member.vue

@@ -165,7 +165,7 @@ export default {
 }
 .app-tabs {
     position: fixed;
-    width: 40%;
+    width: 100%;
     z-index: 9;
   }
 .tabs-wrap {
@@ -184,7 +184,7 @@ export default {
     position: fixed;
     top: 0;
     z-index: 10;
-    width: 40%;
+    width: 100%;
     height: 100upx;
     display: flex;
     align-items: center;

+ 2 - 2
ghsApp/src/admin/home/order.vue

@@ -290,7 +290,7 @@ page{
   }
   .app-tabs {
     position: fixed;
-    width: 40%;
+    width: 100%;
     z-index: 9;
   }
   .input-wrap_box {
@@ -298,7 +298,7 @@ page{
     position: fixed;
     top: 0;
     z-index: 10;
-    width: 40%;
+    width: 100%;
     height: 100upx;
     display: flex;
     align-items: center;

+ 2 - 2
ghsApp/src/static/css/base.scss

@@ -7,8 +7,8 @@
     min-height: 100vh;
     position: relative;
     //商业收银台打开下面二个设置
-    width:40%;
-    margin:0 auto;
+    //width:40%;
+    //margin:0 auto;
 }
 /* #ifdef H5 */
 .app-content.app-main {

+ 320 - 0
收银台/ghsApp/src/admin/home/member.vue

@@ -0,0 +1,320 @@
+<template>
+  <div class="app-main app-content">
+    <view class="input-wrap_box">
+      <view>
+        <AppSearchModule placeholder="输英文字母搜索,花朵朵填hdd" @input="searchFn"/>
+      </view>
+    </view>
+    <view class="app-tabs">
+    <app-tabs
+      :tabs="tabs"
+      :isFixed="false"
+      :top="50"
+      :currentTab="tabIndex"
+      :height="100"
+      @change="change"
+      itemWidth="33%"
+      :isAdd="false"
+    />
+     </view>
+     <div class="list-wrap">
+    <block v-if="!$util.isEmpty(list.data)">
+      <block v-for="(item, index) in list.data" :key="index">
+        <tui-list-cell :arrow="true" @click="pageTo({url: '/pagesClient/member/detail',query: {id: item.id,},})">
+          <div class="tui-msg-box">
+            <img :src="item.avatar" class="tui-msg-pic" mode="widthFix" />
+            <div class="tui-msg-item">
+              <div class="tui-msg-name">
+                <div class="tui-user-name">{{ item.name }}</div>
+              </div>
+              <div class="tui-msg-content">
+                <span>{{ item.visitTime.substr(5,11) }}</span>
+                <span style="margin-left:50upx;width:70upx;color:red;font-weight:500">
+                  <text v-if="item.level == 1"></text>
+                  <text v-else-if="item.level == 0" style="color:#999;">{{ item.levelName }}</text>
+                  <text v-else>{{ item.levelName }}</text>
+                </span>
+                <span v-if="tabIndex == 1" class="debt-amount">总消费:<span class="amount_num">{{item.buyAmount}}</span></span>
+                <span v-else>
+                  <span v-if="item.debtAmount > 0" class="debt-amount">欠款:<span class="amount_num">{{item.debtAmount}}</span></span>
+                </span>
+              </div>
+            </div>
+          </div>
+          <div class="tui-msg-right">
+            <badge-module
+              type="danger"
+              :dot="item.level == 3 ? true : false"
+              v-if="item.messageNum > 0"
+              >{{ item.messageNum }}</badge-module
+            >
+          </div>
+        </tui-list-cell>
+      </block>
+    </block>
+    <block v-else>
+      <app-wrapper-empty :is-empty="$util.isEmpty(list.data)" />
+    </block>
+    </div>
+  </div>
+</template>
+
+<script>
+import AppTabs from "@/components/plugin/tabs";
+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 { getClass, getList } from "@/api/member";
+export default {
+  name: "admin-memebr",
+  components: {
+    AppTabs,
+    TuiListCell,
+    BadgeModule,
+    AppWrapperEmpty,
+    appVipModule,
+    AppTag,
+    AppSearchModule
+  },
+  mixins: [list],
+  data() {
+    return {
+      tabIndex: 0,
+      tabs: [
+        {
+          name: "全部",
+          value: 0
+        },
+        {
+          name: "排行",
+          value: 1
+        },
+        {
+          name: "欠款",
+          value: 2
+        },
+      ]
+    };
+  },
+  onPullDownRefresh() {
+    this.resetList();
+    this._list().then((res) => {
+      uni.stopPullDownRefresh();
+    });
+  },
+  onReachBottom() {
+    if (!this.list.finished) {
+      this._list().then((res) => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+  onLoad(option) {},
+	onShow(){
+		uni.removeStorageSync('newClient');
+	},
+  methods: {
+    init() {
+      if(!this.no_shop_show_model) {
+        this._list();
+      }
+    },
+    searchFn(e) {
+      this.resetList();
+      this.seekVal = e;
+      this._list();
+    },
+    _list() {
+      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[0].value = res.data.totalUser;
+          this.tabs[1].value = res.data.totalUser;
+          this.tabs[2].value = res.data.mayGatheringNum;
+        });
+    },
+    change(e) {
+      if (this.tabIndex == e.index) {
+        return false;
+      }
+      this.tabIndex = e.index;
+      this.resetList();
+      this._list();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.app-content {
+  padding-top: 100upx;
+  padding-bottom: 20upx;
+}
+.app-tabs {
+    position: fixed;
+    width: 40%;
+    z-index: 9;
+  }
+.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: 40%;
+    height: 100upx;
+    display: flex;
+    align-items: center;
+    padding: 0 30upx;
+    & > view:nth-child(1) {
+      flex: 1;
+    }
+  }
+  .list-wrap {
+    padding-top: 100upx;
+    .list {
+      background-color: #fff;
+      margin-bottom: 20upx;
+    }
+  }
+// list
+.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 {
+      /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: 300upx;
+      font-weight:500;
+    }
+  }
+
+  .tui-msg-content {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-size: 24upx;
+    line-height: 1;
+    color: #9397a4;
+    .debt-amount{
+      margin-left:45upx;
+      .amount_num{
+        color:red;
+      }
+    }
+  }
+}
+
+.tui-msg-right {
+  max-width: 120upx;
+  height: 80upx;
+  margin-left: auto;
+  margin-right: 24upx;
+  text-align: right;
+  display: flex;
+  // flex-direction: column;
+  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>

+ 352 - 0
收银台/ghsApp/src/admin/home/order.vue

@@ -0,0 +1,352 @@
+<template>
+  <div class="app-main app-content">
+
+    <view class="input-wrap_box">
+
+      <view @click="setSearchType" style="font-size:30upx;margin-right:10upx;color:#666666">
+      <text>{{searchTypeName}}</text>
+      <i class="iconfont iconsanjiao_xia"></i>
+      </view>
+
+      <view>
+        <AppSearchModule placeholder="输英文字母搜索" @input="searchFn"/>
+      </view>
+
+      <view class="select-dn_bx">
+        <DropShopSelect
+          :menuObj="menuObj"
+          :selectItemId.sync="selectItemId"
+          :typeSelect="1"
+          top="0upx"
+          @selectSussess="selectSussess"
+          :typeTime="true"
+        />
+      </view>
+    </view>
+    <view class="app-tabs">
+      <app-tabs
+        :tabs="tabs"
+        :isFixed="false"
+        :top="50"
+        :currentTab="tabIndex"
+        :height="100"
+        @change="change"
+        itemWidth="20%"
+      />
+    </view>
+    <div class="list-wrap">
+      <block v-if="!$util.isEmpty(list.data)">
+        <div class="list" v-for="(item, index) in list.data" :key="index">
+
+          <OrderItem :item="item" @orderEventBtn="orderEventBtn"></OrderItem>
+
+        </div>
+      </block>
+      <block v-else>
+        <app-wrapper-empty
+          title="暂无数据"
+          :is-empty="$util.isEmpty(list.data)"
+        />
+      </block>
+    </div>
+
+    <rangeDatePick
+      :show="isShow"
+      start="2000-01-01"
+      end="2200-12-01"
+      :value="customizationTime"
+      @change="timeChange"
+      @cancel="timeCancel"
+      themeColor="#4C83D6"
+      fields="day"
+    ></rangeDatePick>
+  </div>
+</template>
+
+<script>
+const Month = new Date().getMonth() + 1 < 10 ? "0" + (new Date().getMonth() + 1) : new Date().getMonth() + 1;
+const time = `${new Date().getFullYear()}-${Month}-${new Date().getDate()}`;
+import AppTabs from "@/components/plugin/tabs";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import ModalModule from "@/components/plugin/modal";
+import { list } from "@/mixins";
+import { mapGetters } from "vuex";
+import { getListB, freeShipping,confirmFinish,cancel } from "@/api/order";
+import AppSearchModule from "@/components/module/app-search";
+import DropShopSelect from "@/components/module/shopSelect";
+import rangeDatePick from "@/components/pyh-rdtpicker/pyh-rdtpicker.vue";
+import BLE from "@/mixins/BLE";
+import orderMixin from "@/mixins/order";
+import OrderItem from "./components/OrderItem";
+export default {
+  name: "order-list",
+  components: {
+    rangeDatePick,
+    AppTabs,
+    AppWrapperEmpty,
+    ModalModule,
+    AppSearchModule,
+    DropShopSelect,
+    OrderItem,
+  },
+  mixins: [list,BLE,orderMixin],
+  computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },
+  data() {
+    return {
+    	orderId:'',
+      seekVal: "",
+      isShow: false, //是否显选择时间段
+      customizationTime: [], //时间段
+      customizationTimeType: "", //时间段
+      menuObj: "", //时间筛选列表
+      tabIndex: 0,
+      tabs: [
+        {
+          name: "全部",
+          value: 0,
+          id: 0,
+        },
+        {
+          name: "待付款",
+          value: 0,
+          id: 1,
+        },
+        {
+          name: "待配送",
+          value: 0,
+          id: 2,
+        },
+        {
+          name: "配送中",
+          value: 0,
+          id: 3,
+        },
+        {
+          name: "已完成",
+          value: 0,
+          id: 4,
+        },
+      ],
+      selectItemId: "",
+      operateIndex: null,
+      operateData: {},
+      // 免发货
+      freeShipModal: false,
+      classifyForm: {
+        categoryId: "",
+        usageId: "",
+      },
+      searchType:0,
+      searchTypeName:'客户',
+    };
+  },
+  onPullDownRefresh() {
+    this.resetList();
+    this._list().then((res) => {
+      uni.stopPullDownRefresh();
+    });
+  },
+  onReachBottom() {
+    if (!this.list.finished) {
+      this._list().then((res) => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+  mounted() {
+  },
+  onLoad(option) {
+    let dateDefaultOption = [];
+    let list = this.getDictionariesInfo.dateDefaultOption;
+    if (!this.$util.isEmpty(list)){
+      for (let i = 0; i < list.length; i++) {
+        dateDefaultOption.push({ name: list[i].name, id: list[i].value });
+      }
+    }
+    this.menuObj = {
+      title: "时间",
+      titleChild: "时间",
+      list: dateDefaultOption,
+    };
+    let tabIndex = uni.getStorageSync("switchTabQuery") || null;
+    if (tabIndex) {
+      uni.removeStorageSync("switchTabQuery");
+      this.tabIndex = parseInt(tabIndex.tabIndex);
+    }
+    this._list();
+  },
+  onShow() {
+
+  },
+  methods: {
+    setSearchType(){
+      let that = this
+      uni.showActionSheet({
+        itemList: ['搜索类型:', '客户', '编号'],
+        success: function (respond) {
+          let currentIndex = respond.tapIndex
+          if(currentIndex == 0){
+            return false
+          }
+          that.searchType = Number(currentIndex) - 1
+          that.searchTypeName = that.searchType == 0 ? '客户' : '编号'
+          that.searchFn()
+        }
+      })
+    },
+    selectTime(type) {
+      (this.customizationTime = [time, time]),
+        (this.customizationTimeType = type),
+        (this.isShow = true);
+    },
+    //选择自定义时间确定
+    timeChange(e) {
+      this.isShow = false;
+      this.resetList();
+      this._list(this.customizationTimeType, e);
+    },
+    //选择自定义时间取消
+    timeCancel(e) {
+      this.isShow = false;
+    },
+    selectSussess(val) {
+      console.log(val);
+      if (val.select == "自定义") {
+        this.selectTime(val.selectItem.id);
+      } else {
+        this.resetList();
+        this._list(val.selectItem.id, "");
+      }
+    },
+    searchFn(e) {
+      this.resetList();
+      this.seekVal = e;
+      this._list();
+    },
+    _list(type, timeArr) {
+      return getListB({
+        searchTime: type,
+        startTime: timeArr ? timeArr[0] : "",
+        endTime: timeArr ? timeArr[1] : "",
+        status: this.tabs[this.tabIndex].id,
+        name: this.seekVal,
+        page: this.list.page,
+        searchType:this.searchType,
+      }).then((res) => {
+        this.completes(res);
+        if (this.$util.isEmpty(res.data)){
+          return false
+        }
+        this.tabs[0].value = res.data.totalNum || 0;
+        this.tabs[1].value = res.data.shop.unPayOrder || 0;
+        this.tabs[2].value = res.data.shop.unSendOrder || 0;
+        this.tabs[3].value = res.data.shop.sendingOrder || 0;
+        this.tabs[4].value = res.data.shop.finishOrder || 0;
+      });
+    },
+    change(e) {
+      if (this.tabIndex == e.index) {
+        return false;
+      } else {
+        this.tabIndex = e.index;
+        this.resetList();
+        this._list();
+      }
+    },
+    // 关闭弹窗
+    modalCancel() {
+      this.freeShipModal = false;
+    },
+    classifyOrder(id) {
+      this.currentOrderId = id;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.admin-button-com {
+  width: 140upx;
+  height: 60upx;
+  padding: 0;
+  line-height: 60upx;
+  text-align: center;
+  font-size: 26upx;
+  &.active {
+    border: 1upx solid #ccc;
+  }
+}
+page{
+	width: 750upx;
+	overflow: hidden;
+}
+.app-content {
+  padding-top: 100upx;
+  padding-bottom: 1upx;
+	overflow: hidden;
+  .select-dn_bx {
+    padding-left: 18upx;
+  }
+  .app-tabs {
+    position: fixed;
+    width: 40%;
+    z-index: 9;
+  }
+  .input-wrap_box {
+    background-color: #fff;
+    position: fixed;
+    top: 0;
+    z-index: 10;
+    width: 40%;
+    height: 100upx;
+    display: flex;
+    align-items: center;
+    padding: 0 30upx;
+    & > view:nth-child(2) {
+      flex: 1;
+    }
+  }
+  .list-wrap {
+    padding-top: 100upx;
+    .list {
+      background-color: #fff;
+      margin-bottom: 20upx;
+    }
+  }
+}
+.upload-confirm-wrap {
+  max-height: 600upx;
+  overflow-y: auto;
+  .modal-tit {
+    @include disFlex(center, center);
+    font-size: 40upx;
+    margin-top: 30upx;
+    margin-bottom: 50upx;
+    .iconfont {
+      color: #09bb07;
+      margin-right: 20upx;
+      font-size: 50upx;
+    }
+  }
+  .sel-wrap {
+    color: $fontColor2;
+    font-size: 32upx;
+    .sel-tit {
+      text-align: left;
+    }
+    .sel-btn {
+      @include disFlex(center, flex-start);
+      flex-wrap: wrap;
+      padding: 10upx 0 40upx;
+      .admin-button-com {
+        margin-right: 20upx;
+        margin-top: 20upx;
+        padding-top: 16upx;
+        padding-bottom: 16upx;
+        border-radius: 4upx;
+      }
+    }
+  }
+}
+</style>

+ 177 - 0
收银台/ghsApp/src/static/css/base.scss

@@ -0,0 +1,177 @@
+/**
+*全局公共样式
+*/
+.app-content {
+    // line-height: 1;
+    background-color: $backColor;
+    min-height: 100vh;
+    position: relative;
+    //商业收银台打开下面二个设置
+    width:40%;
+    margin:0 auto;
+}
+/* #ifdef H5 */
+.app-content.app-main {
+    min-height: calc(100vh - 100upx);
+}
+/* #endif */
+.gray_txt {
+    color: #999 !important;
+}
+
+.ph {
+    font-size: 30upx;
+    color: gray;
+}
+
+.w100 {
+    width: 100% !important;
+}
+
+.ml0{
+    margin-left: 0 !important;
+}
+
+.text_main_color {
+    color: #ff9000;
+}
+
+.underline {
+    text-decoration: underline;
+}
+
+.separate_line {
+    color: #999;
+    margin: 0 16upx;
+}
+
+.text_sub_com {
+    color: #999;
+    font-size: 24upx;
+}
+
+.flex {
+    display: flex;
+}
+
+.flex-center-center {
+    @extend .flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.flex-center {
+    display: flex;
+    align-items: center;
+}
+
+.flex-start {
+    @extend .flex;
+    align-items: flex-start;
+}
+
+.flex-end {
+    @extend .flex;
+    align-items: flex-end;
+}
+
+.flex-center-between {
+    @extend .flex;
+    align-items: center;
+    justify-content: space-between;
+}
+
+.flex-center-around {
+    @extend .flex;
+    align-items: center;
+    justify-content: space-around;
+}
+
+.flex-center-evenly {
+    @extend .flex;
+    align-items: center;
+    justify-content: space-evenly;
+}
+
+.flex-center-start {
+    @extend .flex;
+    align-items: center;
+    justify-content: flex-start;
+}
+
+.flex-center-end {
+    @extend .flex;
+    align-items: center;
+    justify-content: flex-end;
+}
+
+// ===================    定义的全局字体普通样式 ========================
+
+.app-padding {
+	padding: 0 30upx;
+}
+
+.app-color-0 {
+    color: $fontColorMain;
+}
+
+.app-color-1 {
+    color: $mainColor;
+}
+
+.app-color-2 {
+    color: $fontColor2;
+}
+
+.app-color-3 {
+    color: $fontColor3;
+}
+
+.app-color-4 {
+    color: $mainColor1;
+}
+
+// 金额
+.app-price {
+	color: #FF2842;
+}
+
+.app-bold {
+	font-weight: bold;
+}
+
+.app-size-24 {
+	font-size: 24upx;
+}
+
+.app-size-26 {
+	font-size: 26upx;
+}
+
+.app-size-28 {
+	font-size: 28upx;
+}
+
+.app-size-30 {
+	font-size: 30upx;
+}
+
+.app-size-32 {
+	font-size: 32upx;
+}
+
+.app-size-34 {
+	font-size: 34upx;
+}
+
+.app-size-36 {
+	font-size: 36upx;
+}
+
+.app-size-38 {
+	font-size: 38upx;
+}
+
+.app-size-40 {
+	font-size: 40upx;
+}