Răsfoiți Sursa

零售采购分页

shish 4 ani în urmă
părinte
comite
94fd54252e

+ 1 - 1
hdApp/src/admin/home/apply.vue

@@ -51,7 +51,7 @@ export default {
             { name: "员工", img: `${this.$constant.imgUrl}/ghs/home/yggl.png`, url: "/admin/staff/list",pf:0},
             { name: "员工业绩", img: `${this.$constant.imgUrl}/ghs/home/icon_ygyj.png`, url: "/admin/staff/achieve",pf:1},
             { name: "供应商", img: `${this.$constant.imgUrl}/ghs/home/icon_ghs.png`, url: "/pagesPurchase/order",pf:0},
-            { name: "采购单", img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`, url: "/pagesPurchase/shopping",pf:0}
+            { name: "采购单", img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`, url: "/pagesPurchase/shopping",pf:1}
           ]
         },
         {

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

@@ -97,7 +97,7 @@ export default {
         { name: "改价", img: `${this.$constant.imgUrl}/ghs/home/gj.png`, url: "/admin/changePrice/list",pf:0},
         { name: "花材", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/item/list",pf:1 },
         { name: "供应商", img: `${this.$constant.imgUrl}/ghs/home/icon_ghs.png`, url: "/pagesPurchase/order",pf:1 },
-        { name: "采购单", img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`, url: "/pagesPurchase/shopping",pf:0 },
+        { name: "采购单", img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`, url: "/pagesPurchase/shopping",pf:1 },
         { name: "采购结账单", img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`, url: "/admin/clear/list",pf:0 },
         { name: "商品", img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`, url: "/admin/goods/list",pf:1 },
         { name: "商品采购单", img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`, url: "/admin/goods/plantCg",pf:1},

+ 14 - 4
hdApp/src/pagesPurchase/shopping.vue

@@ -18,6 +18,7 @@
 <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";
 export default {
@@ -26,6 +27,7 @@ export default {
     OrderItem,
     AppTabs
   },
+  mixins: [list],
   data () {
     return {
        tabs: [
@@ -63,7 +65,15 @@ export default {
       status: '0'
     }
   },
-  
+  onReachBottom () {
+    if (!this.list.finished) {
+      this.getpurchaseList().then(res => {
+        uni.stopPullDownRefresh()
+      });
+    } else {
+      uni.stopPullDownRefresh()
+    }
+  },
   onPullDownRefresh() {
     this.getpurchaseList().then(res => {
       uni.stopPullDownRefresh()
@@ -86,14 +96,14 @@ export default {
     },
     // 获取采购记录列表
     getpurchaseList () {
-      return purchaseList({ status: this.status }).then(res => {
-        this.list.data = res.data.list
+      return purchaseList({ status: this.status,page: this.list.page }).then(res => {
+        this.completes(res)
         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 // 已完成
-      }).catch(err => { console.log(err) })
+      })
     },
     // 采购记录详情
     gotoDetails (val) {