shish 4 сар өмнө
parent
commit
e19ee859b9

+ 0 - 264
hdApp/src/admin/home/bought.vue

@@ -1,264 +0,0 @@
-<template>
-    <view class="order-page">
-      <app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" @change="change" itemWidth="20%"/>
-  
-              <view style="margin-left:60upx;margin-top:110upx;padding-bottom:30upx;position: relative;">
-                  <DateSelect @selectDateFn="selectDateFn" defaultShowName='时间' />
-          
-          <button class="admin-button-com mini-btn blue" style="position: absolute;right:300upx;top:-8upx;" @click="selGhs()">{{ ghsName==''?'选批发店':ghsName }}</button>
-  
-          <button class="admin-button-com mini-btn blue" style="position: absolute;right:80upx;top:-8upx;" @click="resetSearch()">重置搜索</button>
-  
-              </view>
-  
-      <block v-if="!$util.isEmpty(list.data)">
-      <view class="pay_list">
-          <OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="goToDetail"></OrderItem>
-      </view>
-      </block>
-      <block v-else>
-      <view>
-        <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)"/>
-      </view>
-      </block>
-
-      <NotLogin></NotLogin>
-      <custom-tab-bar :current="1" />
-
-    </view>
-  </template>
-  <script>
-  import AppTabs from "@/components/plugin/tabs";
-  import OrderItem from "./orderItem";
-  import { list } from "@/mixins";
-  import AppWrapperEmpty from "@/components/app-wrapper-empty";
-  import { ghsList, purchaseList } from "@/api/purchase/index";
-  import DateSelect from "@/components/module/dateSelect";
-  import NotLogin from "@/components/not-login";
-  export default {
-    components: {
-      AppWrapperEmpty,
-      OrderItem,
-      AppTabs,
-      DateSelect,
-      NotLogin
-    },
-    mixins: [list],
-    data () {
-      return {
-         tabs: [
-          {
-            name: "全部",
-            value: 0,
-            key: '0'
-          },
-          {
-            name: "待付款",
-            value: 0,
-            key: '1'
-          },
-          {
-            name: "待发货",
-            value: 0,
-            key: '2'
-          },
-          {
-            name: "配送中",
-            value: 0,
-            key: '3'
-          },
-          {
-            name: "已完成",
-            value: 0,
-            key: '4'
-          }
-        ],
-        list: {
-          data: []
-        },
-        supplierList: [],
-        tabIndex: 0,
-        status: '0',
-        refreshPage:1,
-        searchContent:'',			
-        searchTime:'',
-        startTime:'',
-        ghsId:0,
-        ghsName:''
-      }
-    },
-    onReachBottom () {
-      if (!this.list.finished) {
-        this.getMyPurchase().then(res => {
-          uni.stopPullDownRefresh()
-        });
-      } else {
-        uni.stopPullDownRefresh()
-      }
-    },
-    onPullDownRefresh () {
-      this.resetList();
-      this.getMyPurchase().then(res => {
-        uni.stopPullDownRefresh()
-      })
-    },
-    onShow(){
-      if(this.refreshPage == 1){
-        this.resetList()
-        this.getMyPurchase()
-      }
-    },
-    methods: {
-      selGhs(){
-        this.$util.pageTo({ url: "/pagesPurchase/selectGhs"})
-      },
-      resetSearch(){
-        this.ghsId = 0
-        this.ghsName=''
-        this.searchTime = ''
-        this.startTime = ''
-        this.endTime = ''
-        this.resetList()
-        this.getMyPurchase()      
-      },
-          selectDateFn(val) {
-              this.searchTime = val.searchTime
-              this.startTime = val.startTime
-              this.endTime = val.endTime
-        this.resetList()
-        this.getMyPurchase()
-          },	
-      change(e) {
-        if (this.tabIndex != e.index) {
-          uni.pageScrollTo({
-            scrollTop: 0,
-            duration: 0
-          });
-          this.resetList();
-          this.list.finished = true;
-          this.tabIndex = e.index;
-          this.status = e.item.key;
-          this.getMyPurchase().then(() => {
-            this.list.finished = false;
-          });
-        }
-      },
-      init() {
-        if(this.option.ghsId){
-          this.ghsId = this.option.ghsId?this.option.ghsId:0
-          this.ghsName = this.option.ghsName?this.option.ghsName:''
-        }
-        this.getMyPurchase()
-      },
-      getMyPurchase () {
-        return purchaseList({ status: this.status,page: this.list.page,searchTime: this.searchTime,startTime: this.startTime,endTime: this.endTime,ghsId:this.ghsId}).then(res => {
-          this.completes(res)
-          if (this.$util.isEmpty(res.data)){
-            return false
-          }
-          this.tabs[0].value = res.data.shop.totalPurchaseOrder
-          this.tabs[1].value = res.data.shop.cgUnPay
-          this.tabs[2].value = res.data.shop.cgUnSend
-          this.tabs[3].value = res.data.shop.cgSending
-          this.tabs[4].value = res.data.shop.cgFinish
-        })
-      },
-      goToDetail (val) {
-        uni.navigateTo({ url: '/pagesPurchase/purDetails?id=' + val.id })
-      },
-      addEvent() {
-        uni.navigateTo({url: '/pagesPurchase/order'})
-      }
-    }
-  }
-  </script>
-  
-  <style lang="scss" scoped>
-  .order-page {
-    .tabs {
-      height: 80upx;
-      line-height: 80upx;
-      & > view {
-        // padding: 0 80upx;
-        width: 50%;
-        text-align: center;
-        font-size: 28upx;
-        color: #666;
-        display: inline-block;
-      }
-      & > .active {
-        position: relative;
-        color: #3385ff;
-        font-weight: 700;
-      }
-      & > .active::after {
-        content: "";
-        position: absolute;
-        bottom: 0;
-        left: 50%;
-        transform: translateX(-50%);
-        width: 70upx;
-        height: 6upx;
-        background: #3385ff;
-      }
-    }
-    .order_list {
-      // height: 200upx;
-      height: 100%;
-      background: #f0f2f6;
-      padding: 0 0 20upx;
-      .list_item {
-        margin: 20upx 0 0;
-        // padding-left: 20upx;
-        position: relative;
-        height: 180upx;
-        width: 100vw;
-        background: #fff;
-        display: flex;
-        align-items: center;
-        & > image {
-          margin-left: 30upx;
-          width: 120upx;
-          height: 120upx;
-          border-radius: 60upx;
-        }
-        & > .store_name {
-          margin-left: 30upx;
-          & > .store_title {
-            margin-bottom: 30upx;
-            font-size: 32upx;
-            font-weight: 700;
-            color: #333;
-          }
-          & > .accumulative {
-            font-size: 26upx;
-            color: #999;
-          }
-        }
-        & > .store_btn {
-          position: absolute;
-          right: 30upx;
-          // padding-right: 30upx;
-          & > .btn_entrance {
-            display: inline-block;
-            font-size: 26upx;
-            color: #3385ff;
-            border: 1px solid #3385ff;
-            border-radius: 8upx;
-            padding: 15upx 30upx;
-            margin-left: 30upx;
-          }
-          & > .btn_forbid {
-            border: 1px solid #999;
-            color: #999;
-          }
-        }
-      }
-    }
-    .pay_list {
-      padding-top:20upx;
-      padding-bottom: 100upx;
-      background-color: #f0f2f6;
-    }
-  }
-  </style> 

+ 1 - 18
hdApp/src/admin/home/workbench.vue

@@ -40,21 +40,12 @@
   
             <view class="function-grid function-grid--overlay" style="padding: 25upx 0upx 30upx 0upx; display: flex; justify-content: space-around; gap: 12upx;">
               <view class="function-item function-item--overlay" style="flex: 1; text-align: center; border: 1upx solid rgba(255,255,255,0.5); border-radius: 16upx; padding: 15upx 0;" @click="pageTo({url:'/admin/shop/add?id='+loginInfo.shopId})">
-                <view class="function-icon" style="font-size: 38upx; margin-bottom: 8upx;">
-                  📍
-                </view>
                 <text class="function-text function-text--overlay" style="font-size: 22upx;">我的地址</text>
               </view>
               <view class="function-item function-item--overlay" style="flex: 1; text-align: center; border: 1upx solid rgba(255,255,255,0.5); border-radius: 16upx; padding: 15upx 0;" @click="pageTo({url:'/admin/stat/cgItem'})">
-                <view class="function-icon" style="font-size: 38upx; margin-bottom: 8upx;">
-                  📊
-                </view>
                 <text class="function-text function-text--overlay" style="font-size: 22upx;">采购统计</text>
               </view>
               <view class="function-item function-item--overlay" style="flex: 1; text-align: center; border: 1upx solid rgba(255,255,255,0.5); border-radius: 16upx; padding: 15upx 0;" @click="goMore()">
-                <view class="function-icon" style="font-size: 38upx; margin-bottom: 8upx;">
-                  ⋯
-                </view>
                 <text class="function-text function-text--overlay" style="font-size: 22upx;">更多</text>
               </view>
             </view>
@@ -113,6 +104,7 @@
                   <view class="box_9">
                     <view class="tag_2" @click="pageTo({ url: '/admin/ghs/debtChange?ghsId='+ghsInfo.id})"> <text>挂账变动记录</text> </view>
                     <view class="tag_2" @click="pageTo({ url: '/admin/clear/list?ghsId='+ghsInfo.id})"> <text>结账记录</text> </view>
+                    <view class="tag_2" @click="pageTo({url:'/pagesPurchase/shopping?ghsId='+ghsInfo.id+'&ghsName='+ghsInfo.name})"> <text>买花记录</text> </view>
                     <view class="tag_2" @click.stop="callUp(ghsInfo)" style="color:green;font-weight:bold;"> <text>联系我们</text> </view>
                   </view>
                   <view class="box_6 flex-row" @click="settleAccounts(ghsInfo)" v-if="Number(ghsInfo.debtAmount)>0">
@@ -222,15 +214,6 @@
       </view>
     </uni-popup>
 
-    <!-- 买花记录提示 -->
-    <view class="bought-tooltip-box" v-if="showBoughtTooltip" @click.stop="closeBoughtTooltip">
-      <view class="bought-tooltip-content">
-        买花记录 移到这里了
-        <text class="close-tooltip-icon">×</text>
-      </view>
-      <view class="bought-tooltip-arrow"></view>
-    </view>
-
     <custom-tab-bar :current="0" />
 
   </view>

+ 2 - 8
hdApp/src/components/custom-tab-bar/custom-tab-bar.vue

@@ -32,12 +32,6 @@ export default {
 					selectedIconPath: '/static/images/common/buy-is.png',
 					text: '买花'
 				},
-				{
-					pagePath: '/admin/home/bought',
-					iconPath: '/static/images/common/m-no.png',
-					selectedIconPath: '/static/images/common/m-is.png',
-					text: '买花记录'
-				},
 				{
 					pagePath: '/admin/home/mall',
 					iconPath: '/static/images/common/shop-tab_no.png',
@@ -81,10 +75,10 @@ export default {
 			// 原生 tabBar 页面列表
 			const tabBarPages = [
 				'/admin/home/workbench',
-				'/admin/home/bought',
 				'/admin/home/mall',
 				'/admin/home/order',
-				'/admin/home/member'
+				'/admin/home/member',
+				'/admin/home/me',
 			];
 			
 			if (tabBarPages.includes(item.pagePath)) {

+ 6 - 7
hdApp/src/pages.json

@@ -1,7 +1,6 @@
 {
 	"pages": [
 		{ "path": "admin/home/workbench", "style": { "navigationBarTitleText": "买花", "enablePullDownRefresh": true } },
-		{ "path": "admin/home/bought", "style": { "navigationBarTitleText": "买花记录", "enablePullDownRefresh": true } },
 		{ "path": "admin/home/mall", "style": { "navigationBarTitleText": "商城", "enablePullDownRefresh": true } },
 		{ "path": "admin/home/login","style": {"navigationBarTitleText": "","enablePullDownRefresh": false}},
 		{ "path": "admin/home/loginRemind","style": {"navigationBarTitleText": "登录提示","enablePullDownRefresh": false}},
@@ -622,12 +621,6 @@
 				"selectedIconPath": "static/images/common/buy-is.png",
 				"text": "买花"
 			},
-			{
-				"pagePath": "admin/home/bought",
-				"iconPath": "static/images/common/m-no.png",
-				"selectedIconPath": "static/images/common/m-is.png",
-				"text": "买花记录"
-			},
 			{
 				"pagePath": "admin/home/mall",
 				"iconPath": "static/images/common/shop-tab_no.png",
@@ -645,6 +638,12 @@
 				"iconPath": "static/images/common/member-no.png",
 				"selectedIconPath": "static/images/common/member-is.png",
 				"text": "客户"
+			},
+			{
+				"pagePath": "admin/home/me",
+				"iconPath": "static/images/common/user-no.png",
+				"selectedIconPath": "static/images/common/user-is.png",
+				"text": "我的"
 			}
 		]
 	}

+ 260 - 0
hdApp/src/pagesPurchase/shopping.vue

@@ -0,0 +1,260 @@
+<template>
+  <view class="order-page">
+    <app-tabs :tabs="tabs" :isFixed="true" :currentTab="tabIndex" @change="change" itemWidth="20%"/>
+
+			<view style="margin-left:60upx;margin-top:110upx;padding-bottom:30upx;position: relative;">
+				<DateSelect @selectDateFn="selectDateFn" defaultShowName='时间' />
+        
+        <button class="admin-button-com mini-btn blue" style="position: absolute;right:300upx;top:-8upx;" @click="selGhs()">{{ ghsName==''?'选供货商':ghsName }}</button>
+
+        <button class="admin-button-com mini-btn blue" style="position: absolute;right:80upx;top:-8upx;" @click="resetSearch()">重置搜索</button>
+
+			</view>
+
+    <block v-if="!$util.isEmpty(list.data)">
+    <view class="pay_list">
+        <OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="goToDetail"></OrderItem>
+    </view>
+    </block>
+    <block v-else>
+    <view>
+      <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)"/>
+    </view>
+    </block>
+
+  </view>
+</template>
+<script>
+import AppTabs from "@/components/plugin/tabs";
+import OrderItem from "./orderItem";
+import { list } from "@/mixins";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { ghsList, purchaseList } from "@/api/purchase/index";
+import DateSelect from "@/components/module/dateSelect";
+export default {
+  components: {
+    AppWrapperEmpty,
+    OrderItem,
+    AppTabs,
+    DateSelect
+  },
+  mixins: [list],
+  data () {
+    return {
+       tabs: [
+        {
+          name: "全部",
+          value: 0,
+          key: '0'
+        },
+        {
+          name: "待付款",
+          value: 0,
+          key: '1'
+        },
+        {
+          name: "待发货",
+          value: 0,
+          key: '2'
+        },
+        {
+          name: "配送中",
+          value: 0,
+          key: '3'
+        },
+        {
+          name: "已完成",
+          value: 0,
+          key: '4'
+        }
+      ],
+      list: {
+        data: []
+      },
+      supplierList: [],
+      tabIndex: 0,
+      status: '0',
+      refreshPage:0,
+			searchContent:'',			
+			searchTime:'',
+			startTime:'',
+      ghsId:0,
+      ghsName:''
+    }
+  },
+  onReachBottom () {
+    if (!this.list.finished) {
+      this.getMyPurchase().then(res => {
+        uni.stopPullDownRefresh()
+      });
+    } else {
+      uni.stopPullDownRefresh()
+    }
+  },
+  onPullDownRefresh () {
+    this.resetList();
+    this.getMyPurchase().then(res => {
+      uni.stopPullDownRefresh()
+    })
+  },
+  onShow(){
+    if(this.refreshPage == 1){
+      this.resetList()
+      this.getMyPurchase()
+      this.refreshPage = 0
+    }
+  },
+  methods: {
+    selGhs(){
+      this.$util.pageTo({ url: "/pagesPurchase/selectGhs"})
+    },
+    resetSearch(){
+      this.ghsId = 0
+      this.ghsName=''
+      this.searchTime = ''
+      this.startTime = ''
+      this.endTime = ''
+      this.resetList()
+      this.getMyPurchase()      
+    },
+		selectDateFn(val) {
+			this.searchTime = val.searchTime
+			this.startTime = val.startTime
+			this.endTime = val.endTime
+      this.resetList()
+      this.getMyPurchase()
+		},	
+    change(e) {
+      if (this.tabIndex != e.index) {
+        uni.pageScrollTo({
+          scrollTop: 0,
+          duration: 0
+        });
+        this.resetList();
+        this.list.finished = true;
+        this.tabIndex = e.index;
+        this.status = e.item.key;
+        this.getMyPurchase().then(() => {
+          this.list.finished = false;
+        });
+      }
+    },
+    init() {
+      if(this.option.ghsId){
+        this.ghsId = this.option.ghsId?this.option.ghsId:0
+        this.ghsName = this.option.ghsName?this.option.ghsName:''
+      }
+      this.getMyPurchase()
+    },
+    getMyPurchase () {
+      return purchaseList({ status: this.status,page: this.list.page,searchTime: this.searchTime,startTime: this.startTime,endTime: this.endTime,ghsId:this.ghsId}).then(res => {
+        this.completes(res)
+        if (this.$util.isEmpty(res.data)){
+          return false
+        }
+        this.tabs[0].value = res.data.shop.totalPurchaseOrder
+        this.tabs[1].value = res.data.shop.cgUnPay
+        this.tabs[2].value = res.data.shop.cgUnSend
+        this.tabs[3].value = res.data.shop.cgSending
+        this.tabs[4].value = res.data.shop.cgFinish
+      })
+    },
+    goToDetail (val) {
+      uni.navigateTo({ url: '/pagesPurchase/purDetails?id=' + val.id })
+    },
+    addEvent() {
+      uni.navigateTo({url: '/pagesPurchase/order'})
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.order-page {
+  .tabs {
+    height: 80upx;
+    line-height: 80upx;
+    & > view {
+      // padding: 0 80upx;
+      width: 50%;
+      text-align: center;
+      font-size: 28upx;
+      color: #666;
+      display: inline-block;
+    }
+    & > .active {
+      position: relative;
+      color: #3385ff;
+      font-weight: 700;
+    }
+    & > .active::after {
+      content: "";
+      position: absolute;
+      bottom: 0;
+      left: 50%;
+      transform: translateX(-50%);
+      width: 70upx;
+      height: 6upx;
+      background: #3385ff;
+    }
+  }
+  .order_list {
+    // height: 200upx;
+    height: 100%;
+    background: #f0f2f6;
+    padding: 0 0 20upx;
+    .list_item {
+      margin: 20upx 0 0;
+      // padding-left: 20upx;
+      position: relative;
+      height: 180upx;
+      width: 100vw;
+      background: #fff;
+      display: flex;
+      align-items: center;
+      & > image {
+        margin-left: 30upx;
+        width: 120upx;
+        height: 120upx;
+        border-radius: 60upx;
+      }
+      & > .store_name {
+        margin-left: 30upx;
+        & > .store_title {
+          margin-bottom: 30upx;
+          font-size: 32upx;
+          font-weight: 700;
+          color: #333;
+        }
+        & > .accumulative {
+          font-size: 26upx;
+          color: #999;
+        }
+      }
+      & > .store_btn {
+        position: absolute;
+        right: 30upx;
+        // padding-right: 30upx;
+        & > .btn_entrance {
+          display: inline-block;
+          font-size: 26upx;
+          color: #3385ff;
+          border: 1px solid #3385ff;
+          border-radius: 8upx;
+          padding: 15upx 30upx;
+          margin-left: 30upx;
+        }
+        & > .btn_forbid {
+          border: 1px solid #999;
+          color: #999;
+        }
+      }
+    }
+  }
+  .pay_list {
+    padding-top:20upx;
+    padding-bottom: 100upx;
+    background-color: #f0f2f6;
+  }
+}
+</style>